Class: Logger
@ima/dev-utils.Logger
Constructors
constructor
• new Logger(identifier?
, globalLogger?
)
Parameters
Name | Type |
---|---|
identifier? | string |
globalLogger? | Logger |
Defined in
Properties
#globalLogger
• Private
Optional
#globalLogger: Logger
Defined in
#identifier
• Private
Optional
#identifier: string
Defined in
#isSilent
• Private
#isSilent: boolean
= false
Defined in
innerElapsed
• Optional
innerElapsed: () => string
Type declaration
▸ (): string
Returns time utility function, which when called returns formatted elapsed time from it's creation.
Returns
string
Callback to return formatted elapsed time.
Defined in
Methods
#log
▸ Private
#log(prefix
, chalkFn
, message
, «destructured»?
): void
Parameters
Name | Type |
---|---|
prefix | string |
chalkFn | (input : undefined | null | string | number ) => string |
message | string |
«destructured» | LoggerOptions |
Returns
void
Defined in
endTracking
▸ endTracking(): void
Returns
void
Defined in
error
▸ error(message
, options?
): void
Parameters
Name | Type |
---|---|
message | string | Error |
options? | LoggerOptions |
Returns
void
Defined in
info
▸ info(message
, options?
): void
Parameters
Name | Type |
---|---|
message | string |
options? | LoggerOptions |
Returns
void
Defined in
isSilent
▸ isSilent(): boolean
Returns
boolean
Defined in
plugin
▸ plugin(message
, options?
): void
Parameters
Name | Type |
---|---|
message | string |
options? | LoggerOptions |
Returns
void
Defined in
setSilent
▸ setSilent(isSilent
): void
Parameters
Name | Type |
---|---|
isSilent | boolean |
Returns
void
Defined in
success
▸ success(message
, options?
): void
Parameters
Name | Type |
---|---|
message | string |
options? | LoggerOptions |
Returns
void
Defined in
sync
▸ sync(message
, options?
): void
Parameters
Name | Type |
---|---|
message | string |
options? | LoggerOptions |
Returns
void
Defined in
warn
▸ warn(message
, options?
): void
Parameters
Name | Type |
---|---|
message | string |
options? | LoggerOptions |
Returns
void
Defined in
write
▸ write(message
, options?
): void
Parameters
Name | Type |
---|---|
message | string |
options? | LoggerOptions |
Returns
void
Defined in
writeElapsed
▸ writeElapsed(elapsed
): void
Parameters
Name | Type |
---|---|
elapsed | () => string |
Returns
void