System Logs
You cannot create, edit, or delete records in the Main Log (sys_log), Script Log (sys_log_script), and Exception Log (sys_log_exception) tables. Only users with the admin role can read them.
If you need to find specific records or to sort them in a particular order, use the condition builder to configure the filters that best suit your needs.
Main Log
Navigate to System Logs → Main Log to read the records of this storage.
The following system events are recorded in the storage:
- adding attachments
- impersonation
- performing a search
- performing a quick import
- LDAP user authorization
- LDAP autoprovision (creating user accounts via LDAP)
- email authorization
- calling the server-side SimpleSystem logging methods
- server validation errors
- incoming email errors
- errors occurred when sending incorrect parameters into notifications.
Main Log form fields
Field | Description |
---|---|
Source | Message source (the module, script, or functionality that was the originator of the logging). |
Level | Message importance level:
These messages can be added using relevant SimpleSystem API methods. |
Message | The log message content. |
Username | Reference to the user who initiated this record creation. |
Script Log
This storage is for script execution extended information. All related information can be found here, from the script body to its memory usage.
It is recommended to use the Script Log only for test instances. When used in production, it creates a significant load on the servers and can degrade the performance.
Set the value of the simple.logs.enable_script_logging property to false to disable the script logging.
Navigate to System Logs → Script Log to access these storage records.
Script Log record fields
Field | Description |
---|---|
Script document | A reference to the script object realized by this script. It may be, for example, a business rule. |
Script | The script body. |
Result | Script execution results (the returned value, as an example). |
Exception log | Reference to the Exception Log record that appeared during script execution. |
Essence document | A reference to the object on which this script was executed. |
URL | Page URL where the script was called. |
Username | Reference to the user who initiated creation of this record. |
Start time | This field displays the timestamp when the script started (in the Unix time format). |
Processing time | Script processing time (in seconds). |
Memory usage | Total script memory usage. |
Memory start | Script memory usage when it just started. |
Exception Log
This storage contains records with an exception thrown when the script is executed.
Navigate to System Logs → Exception Log to access these storage records.
Exception Log form fields
Field | Description |
---|---|
Message | Error message text returned by script. |
Username | Reference to the user initiated this record creation. |
File | PHP-script file that has returned this error. |
String | Line number in script file. |
Backtrace | A call back stack with a list of the functions called. |
Page URL | Link to a page where this exception was thrown. |
Log Archiving
Instance log storage grows over time. And in most cases, the analysis requires logs from the last two weeks or a month.
The log archiving engine allows you to save outdated logs, so that they do not affect system performance.
Archiving setup
The archiving engine is not active by default. To activate it, complete the steps below:
- Navigate to System Scheduler → Schedule Script.
- Open one of the Run Log Archiving records and select the Active checkbox.
- Click Save or Save and exit to apply the changes.
The "out-of-box" solution includes three archive scripts with different start times: 1 a.m., 3 a.m. and 5 a.m. You can specify different time and frequency for the archiving. To do so, edit the existing records, or create similar records with the Make a copy UI action and modify the copy.
The background archiving process performs the following operations:
- Collects logs which are the most outdated at the moment.
- Pack them into an archive.
The script determines the oldest log from three following tables: Main Log (sys_log), Script Log (sys_log_script), and Exception Log (sys_log_exception). After that, the check is performed whether these logs are outdated at the moment. To do so, the simple.logs.rotate_period_in_days property is used. This property allows you to set the logs' rotation period in days. If a period is not defined, the default value is 30 days.
Manage log archives
To unpack a log archive, complete the steps below:
- Navigate to System Logs → Archive.
- Find the date you need the logs for and go to the specified logs record.
- On the record form, click on the Unpack button.
- Once completed, all records will be available in the relevant tables.
To pack a log archive, complete the steps below:
- Navigate to log record.
- Click Archive unpacked data.