Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AccessGroup

Hierarchy

Index

Constructors

constructor

Methods

Protected _setter

  • _setter(name: string, setter: function): void
  • _setter - creates a setter for a setting

    Parameters

    • name: string

      the name of the setting.

    • setter: function

      the function used to set the value. should accept a value and return another.

        • (value: any): any
        • Parameters

          • value: any

          Returns any

    Returns void

add

  • add - adds a new transport.

    Parameters

    • transport: Transport | Function

      the transport to add. If given a class then a instance will be created.

    Returns LogGroup

    used for chaining.

format

  • format(name: string, fmt: string): LogGroup
  • format - adds a new format string.

    Parameters

    • name: string

      the name of the format.

    • fmt: string

      the format string.

    Returns LogGroup

    used for chaining.

get

  • get(name: string): any
  • get - returns the value of a setting.

    Parameters

    • name: string

      the name of the setting.

    Returns any

    the value of the setting.

middleware

  • middleware(): LoggerMiddleware

remove

  • remove - removes a transport.

    Parameters

    • transport: Transport | Function | string

      This should be either the name of the transport or the value used to add it.

    Returns LogGroup

    used for chaining.

set

  • set(name: string, value: any): LogGroup
  • set - sets the value of a setting.

    Parameters

    • name: string

      the name of the setting.

    • value: any

      the value for the setting.

    Returns LogGroup

    used for chaining.

token

write

  • write(chunk: string | Object, callback?: function): void
  • write - writes out to every transport

    Parameters

    • chunk: string | Object

      the chunk to write out

    • Default value callback: function = () => {}

      this is called when the write is done. If there was an error it is passed to this.

        • (err?: Error): void
        • Parameters

          • Optional err: Error

          Returns void

    Returns void

    void

Generated using TypeDoc