console.time()

console.time(label) Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique label. Use the same label when you call console.timeEnd() to stop the timer and output the elapsed time in milliseconds to stdout. Timer durations are accurate to the sub-millisecond.

console.info()

console.info([data][, ...]) The console.info() function is an alias for console.log().

console.error()

console.error([data][, ...]) Prints to stderr with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to printf(3) (the arguments are all passed to util.format()). const code = 5; console.error('error #%d', code); // Prints: error #5, to stderr console.error('error', code); // Prints: error 5, to stderr If formatting elements (e.g. %d) are not found in the first string then util.inspect() is called on

console.assert()

console.assert(value[, message][, ...]) A simple assertion test that verifies whether value is truthy. If it is not, an AssertionError is thrown. If provided, the error message is formatted using util.format() and used as the error message. console.assert(true, 'does nothing'); // OK console.assert(false, 'Whoops %s', 'didn\'t work'); // AssertionError: Whoops didn't work

console.dir()

console.dir(obj[, options]) Uses util.inspect() on obj and prints the resulting string to stdout. This function bypasses any custom inspect() function defined on obj. An optional options object may be passed to alter certain aspects of the formatted string: showHidden - if true then the object's non-enumerable and symbol properties will be shown too. Defaults to false. depth - tells util.inspect() how many times to recurse while formatting the object. This is useful for inspecting large com

connection event (net.Server)

Event: 'connection' <net.Socket> The connection object Emitted when a new connection is made. socket is an instance of net.Socket.

Console

Class: Console The Console class can be used to create a simple logger with configurable output streams and can be accessed using either require('console').Console or console.Console: const Console = require('console').Console; const Console = console.Console;

connect event (net.Socket)

Event: 'connect' Emitted when a socket connection is successfully established. See connect().

connect event (http.Server)

Event: 'connect' function (request, socket, head) { } Emitted each time a client requests a http CONNECT method. If this event isn't listened for, then clients requesting a CONNECT method will have their connections closed. request is the arguments for the http request, as it is in the request event. socket is the network socket between the server and client. head is an instance of Buffer, the first packet of the tunneling stream, this may be empty. After this event is emitted, the reque

connection event (http.Server)

Event: 'connection' function (socket) { } When a new TCP stream is established. socket is an object of type net.Socket. Usually users will not want to access this event. In particular, the socket will not emit 'readable' events because of how the protocol parser attaches to the socket. The socket can also be accessed at request.connection.