Class PatternLayout

A flexible layout configurable with pattern string.

Info:

  • Copyright: GrayWolf64
  • License: Apache License 2.0

Local Functions

patternlayout.DoFormat (event, colored) Format the LogEvent using patterns.
patternlayout.mkfunc_precolor (tokenName, color) Make a function that can replace a table's matching values with replacement content(string), and insert a Color before each replaced value.

Methods

patternlayout:Format (event, colored) Format a LogEvent.


Local Functions

patternlayout.DoFormat (event, colored)
Format the LogEvent using patterns.

Parameters:

  • event LogEvent
  • colored If use Colors.
patternlayout.mkfunc_precolor (tokenName, color)
Make a function that can replace a table's matching values with replacement content(string), and insert a Color before each replaced value. Based on colored bool, it will decide if Colors will be inserted.

Parameters:

  • tokenName String to search for and to be replaced
  • color Color object to insert before each replaced value

Methods

patternlayout:Format (event, colored)
Format a LogEvent.

Parameters:

  • event LogEvent
  • colored If use Colors.

Returns:

    vararg result
generated by LDoc 1.5.0 Last updated 2023-07-17 09:58:50