Files
common/docs/util/modules/_logger_.md
T
2018-12-05 14:47:44 +00:00

1.1 KiB

Functions

format

▸ format(value: any): any

Defined in logger.ts:36

Parameters:

Name Type
value any

Returns: any


logger

▸ logger(_type: string): Logger

Defined in logger.ts:109

name: Logger

signature: logger (type: string): Logger

summary: Creates a consistent log interface for messages

description: Returns a Logger that has .log, .error, .warn and .debug (controlled with environment DEBUG=typeA,typeB) methods. Logging is done with a consistent prefix (type of logger, date) followed by the actual message using the underlying console.

example:

const l from '@polkadot/util/logger')('test');

l.log('blah'); // <date>     TEST: blah

Parameters:

Name Type
_type string

Returns: Logger