Home Reference Source Test
import Logger from 'shinka-cli/src/Logger/Logger.js'
public class | source

Logger

Drop-in replacement for console.log.

Optionally silences and forces output.

Test:

Constructor Summary

Public Constructor
public

constructor(silent: boolean, channel: Object)

Member Summary

Public Members
public

Object with #log method.

public

Namespace to force log output.

public

Silences output unless forced.

Method Summary

Public Methods
public

log(msg: string)

Outputs message unless silenced.

Public Constructors

public constructor(silent: boolean, channel: Object) source

Params:

NameTypeAttributeDescription
silent boolean
  • optional
  • default: false
channel Object
  • optional
  • default: console

Test:

Public Members

public channel: LogObject source

Object with #log method.

Properties:

NameTypeAttributeDescription
log function

public force: Object source

Namespace to force log output.

Properties:

NameTypeAttributeDescription
force.log function(msg: string)

Always outputs message.

See:

public silent: boolean source

Silences output unless forced.

Public Methods

public log(msg: string) source

Outputs message unless silenced.

Params:

NameTypeAttributeDescription
msg string

Test: