This modules allows you to create a filtered log from your properties.
You can specify some options in parameters.json, which will alter the behaviour of the log.
This parameter defaults to %application%/data/log/%environment%.filtered.log
.
This parameter takes an array of log levels.
Available levels are:
- "E" for error
- "I" for information
- "W" for warning
- "D" for debug
Example:
// parameters.json
{
// ...
"log.levels" : ["E", "I", "D", "W"]
}
This parameter takes an array of fields which can be showed in your log messages. This order of the fields will determine the order in which they appear in log messages.
Available fields are:
- "id" -"date" -"client" -"duration" -"source" -"memory" -"level" -"title" -"description"
Example:
// parameters.json
{
// ...
"log.fields" : ["duration", "source", "title", "description"]
}
This parameter takes an array of sources. Examples are "app" or "database".
Example:
// parameters.json
{
// ...
"log.sources" : ["app", "controller"]
}
A separator can be specified to override the default column separator. This parameter requires a string value.
Example:
// parameters.json
{
// ...
"log.separator" : "::"
}
By enabling this option, the log will be colored. This parameter requires a boolean value.
Example:
// parameters.json
{
// ...
"log.colors" : true
}
Specify a different log file by providing a path.
Example:
// parameters.json
{
// ...
"log.file": "/sites/ridme/htdocs/debug.log",
}
- Field specific colors.
- Add a cli command to start logging with an optional specified config.