As of Jomres 9.8.5, we have updated the older logging in Jomres to use the Monolog class introduced in 9.8.0.
As a developer, if you want to log activity in Jomres, the recommended method of doing that now is to do something like
logging::log_message($message, $channel , $level );
logging::log_message('Jomres started' , "Core" , "DEBUG" );
Here you will see the message being recorded, the "channel", and the log level. If the channel isn't set, then "Core" is assumed. If the log level isn't set, then "DEBUG" is assumed.
When the log file is saved, the "channel" is used to determine the file the log is saved to, so "Core" messages to be logged are sent to the /logdirectory/Core.application.log file, API messages are sent to API.application.log.
Debug messages are only stored when the system is set to Development ( Site Configuration -> Debugging ). Otherwise, only messages of INFO or higher are recorded.
You can view the contents of Log Files through the Available Logs page.
All log files are zipped up when their file size exceeds 1mb in size.
Site Administrators can configure the log location through Site Configuration. If not set, by default logs are saved to the /jomres/logs directory, however due to the sensitive nature of the information that can be stored in these files, we recommend that they be stored above the web root for extra safety.
- DEBUG Detailed debug information.
- INFO Interesting events. Examples: User logs in, SQL logs.
- NOTICE Normal but significant events.
- WARNING Exceptional occurrences that are not errors. Examples: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.
- ERROR Runtime errors that do not require immediate action but should typically be logged and monitored.
- CRITICAL Critical conditions. Example: Application component unavailable, unexpected exception.
- ALERT Action must be taken immediately. Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.
- EMERGENCY Emergency: system is unusable.
In Jomres 9.8.8 we have added the ability to configure a syslog server, so that logging messages can be sent to a remote server ( including phone apps ).