require("base-logger/formatter")(group) → {module:base-logger/formatter~Formatter}
This function returns a formatter function which is used to format logs
Parameters:
| Name | Type | Description |
|---|---|---|
group |
string | the log group |
- Source:
Properties:
| Name | Type | Argument | Description |
|---|---|---|---|
pattern |
string | module:base-logger~LogPattern |
<optional> |
the pattern used for formatting the logs. If the value is
a |
Returns:
the formatter function
format module is used to format log messages with a pattern.
- Source:
Requires
Type Definitions
-
Formatter(time, logLevel, args) → {string}
-
The formatter function is used to format objects into a loggable string
Parameters:
Name Type Description timeDate the logging time
logLevelstring the level of the logger message
argsArray.<*> the objects or Strings to log
- Source:
Returns:
the parsed and formatted logggable string
- Type
- string