Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface LoxerConfig

Configuration for the LoxerOptions

Hierarchy

  • LoxerConfig

Properties

Optional moduleTextSlice

moduleTextSlice: number

the length where the modules' names will be sliced in order to fit the layout.

  • defaults to 8

Optional endTitleOpacity

endTitleOpacity: number

the opacity of the moduleText (options.modules[...].fullName) that appears on the Loxer.of(...).close() log

  • number between [0,1]
  • defaults to 0 which means "hidden"

Optional boxLayoutStyle

boxLayoutStyle: BoxLayoutStyle

the style of the default Box-layout

  • possible values are "round" | "light" | "heavy" | "double" | "off"
  • 'off' does not print any Layout but saves the insets, that the box layout would need
  • defaults to 'round'

Optional disabledInProductionMode

disabledInProductionMode: boolean

disables Loxer in production mode.

  • if Loxer is initialized with options.config.disabledInProductionMode: true then - in production environment - the cache is erased and upcoming logs will not be cached anymore
  • in fact all logging function then immediately return "nothing" for performance reasons
  • defaults to false

Optional disabled

disabled: boolean

disables Loxer completely.

  • this MUST be used in order to suppress logging without deleting the Loxer calls!
  • without disabling AND init() of Loxer, all the logs will be cached "infinitely", because they "wait" for the init().
  • if Loxer is initialized with options.config.disabled: true then the cache is erased and upcoming logs will not be cached anymore
  • in fact all logging function then immediately return "nothing" for performance reasons
  • defaults to false

Optional highlightColor

highlightColor: string

the backgroundColor used for highlighting logs. Supported formats:

  • hex-string: (eg: '#ff0000' or '#f00' for red)
  • rgb-string: (eg: 'rgb(255, 0, 0)' for red)
  • defaults to "inverted" colors

Optional disableColors

disableColors: boolean

disables all colors for the output.

  • use this if the console can't handle \x1b[38;2;R;G;Bm colors.
  • this only takes effect, if the Callbacks are unset and the console.log is used internally.
  • the Callbacks receive colored and uncolored messages separately
  • defaults to false

Optional historyCacheSize

historyCacheSize: number

determines how many output- / error logs shall be cached in the history.

  • is accessible with Loxer.history
  • will be additionally appended to error outputs
  • defaults to 50

Generated using TypeDoc