$sugar_config['suitesuperlogger']['colour'] = true;
I’ve previously created a very simple module for SuiteCRM which adds coloured logging (SuiteCRM Super Logger). I’ve now expanded it somewhat to add extra features.
It’s now called SuiteSuperLogger and allows specifying the log format in the config. It can be downloaded from the original blog post
Enabling coloured logging can be done by adding
$sugar_config['suitesuperlogger']['colour'] = true;
To the config.
Altering the log format can be done by adding the following to
config_override.php
:
$sugar_config['suitesuperlogger']['format'] = ':date:[:pid:][:userId:][:level:][:remoteAddr:][:forwardedAddr:][:requestMethod:]:msg:';
The following placeholders are accepted and will be replaced with an appropriate value:
date |
The date the message was logged |
pid |
The process id |
userId |
The logged in user id |
level |
The log level |
remoteAddr |
The remote address as found in the PHP $_SERVER superglobal. |
forwardedAddr |
The HTTP X FORWARDED FOR header |
requestMethod |
The request method (i.e. GET, POST, e.t.c.) |
msg |
The actual log message |
By Jim Mackin | July 23, 2018
Content is available under GNU Free Documentation License 1.3 or later unless otherwise noted.