Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In SimpleOne, there are several log storages handled by the System Logs module. You can use them for troubleshooting and debugging that may take place. The storages are:

  • Main Log;
  • sys_log_script;
  • sys_log_exception;
  • System History.
To be more specific: Main Log is a general log storage,
  •  – general log storage: all the logs generated by any module or script
will be recorded there; sys_log_script is a storage
  • are recorded there.
  • History – storage of the field changes.
  • Script Log – storage of the extended logs of the script
execution; sys_log_exception is a storage
  • execution logs
  • Exception Log – storage for the exceptions thrown
when running a script; System History is a storage of the field changes.
  • during a server-side query.
  • Record Deletion Log – storage for deleted objects.


Tipnote

Role required: admin.

Main

logTo access this storage, navigate to the System Logs → Main Log {or, in general, follow the link looking like {your_instance_url}/list/

Log


Note

You cannot create, edit, or delete records in the Main Log (sys_log) table. Only users with the admin role can read them.

To access this storage, please follow the link looking like {your_instance_url}/list/sys_log_exception)navigate to the System Logs → Main Log.

If you need to find any specific records or to sort them in any a particular order, then you can do this using use a filter tool in at the top of the page.   Use the Condition Builder to build to configure the filter filters that will fit your needs most.

sys_log list fields

The following system events are written down in the storage:

  • adding attachments
  • impersonation
  • search performing
  • quick import logs
  • 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

Level
FieldMandatoryDescription
SourceYMessage source (the module, script, or functionality that was the originator of the logging).
LevelY
FieldDescription
SysThe unique ID of the message.
Sys created atThis field stores information about the record creating date and time.
Sys created byReference to the user who has created the record in the table.
Sys updated atThis field stores information about the record updating date and time.

Message importance level:

  • Debug - debug – debug message;
  • Info -  – information message;
  • Warning -  – warning message;
  • Error -  – error message.

These messages are also can be added by relevant using relevant SimpleSystem API methods.

MessageNThe log message content.
SourceThe message source (the module or script or functionality that was the originator of the logging).

sys_log_script

.
UsernameNReference to the user initiated this record creation.


Info

In the audit.tables.ignoredList property, you can specify tables which changes will not be saved in history. 

History


History storage displays the record field changes in all tables in the human-readable format.

Note

You cannot create, edit, or delete records in the History (sys_history) table. Only users with the admin role can read them.

To access System History, navigate to the System Logs → History.

If you need to find specific records or to sort them in a particular order, use a filter tool at the top of the page. Use the Condition Builder to configure the filters that will fit your needs most.

History form fields

FieldMandatoryDescription
Table NameYThe table name.
Field NameYThe changed field.
RecordYThe record ID.
Old ValueNOld record value.
New ValueNNew record value.
TypeY

Change type:

  • Insert
  • Update
  • Delete.
UsernameYUsername of the change originator.

Script Log


This storage is for script execution extended information. All related information can be found hereThis storage is for scripts execution extended information, All the related information can be found there, from the script body to its memory usage.To access this storage, follow the link looking like {your_instance_url}/list/

Note

You cannot create, edit, or delete records in the Script Log (sys_log_script) table. Only users with the admin role can read them.

To access this storage, navigate to System Logs → Script Log.

If you need to find any specific records or to sort them in any a particular order, then you can do this using use a filter tool in at the top of the page.   Use the Condition Builder to build to configure the filter filters that will fit your needs most.

Click on the value in the Sys column, and you will enter the specific history record.

sys_log_script record Script Log record fields

InfoScript document
FieldMandatoryDescription
Information returned by scriptScript The script body.
ResultThe script execution result.
DocumentNA reference to the script object realized by this script. It may be, for example, a business rule or something else.Essence document.
ScriptNThe script body.
ResultNScript execution results (the returned value, as an example).
Exception Log NReference to the Exception Log record that appeared during script execution.
Essence DocumentN

A reference to the object on which this object was executed.

Script and Essence docs

Image Removed

Page uuid

documents

Image Added

Start TimeNThis field shows the script start timestamp (in the Unix time format).
Processing TimeNScript processing time (in seconds).
Memory UsageNTotal script memory usage.
Memory StartNScript memory usage when it just started.
PageNThe unique ID of the page on which the script was executed. If more than one log records have the same Page UUID, it means that the different scripts or actions were run running on the same page.
URL
Start timeThis field shows the script start timestamp (in the Unix-time format).
SourceThe type of the script that is the originator of the adding a log record.
URLURL of the page on which the script was executed.
Sys updated by Reference to the user who updated record in the table.
Sys created byReference to the user who created the record in the table.
Processing timeScript processing time (in seconds).
Memory startScript memory usage when just started.
Memory usageTotal script memory usage.
sys_log_exception
NPage URL where the script has been called.
InfoNInformation returned by the script.
UsernameNReference to the user initiated this record creation.

Exception Log 
Anchor
exception log
exception log


This storage contains records with the exception thrown when running a script.To access this storage, please follow the link looking like {your_instance_url}/list/

Note

You cannot create, edit, or delete records in the Exception Log (sys_log_exception) table. Only users with the admin role can read them.

To access this storage, please navigate to System Logs → Exception Log.

If you need to find any specific records or to sort them in any a particular order, then you can do this using use a filter tool in at the top of the page.   Use the Condition Builder to build to configure the filter filters that will fit your needs most.

Click on the value in the Sys column, and you will enter the specific history record.

sys_log_exception record fields

Exception Log

FieldPage URL
FieldMandatoryDescription
MessageNError message text returned by script.
FileNPHP-script file that has returned this error.
StringNLine number in script file.
BacktraceNA call back stack with a list of the functions called.
Sys updated by Reference to the user who has updated record in this table.
Sys created byReference to the user who has created the record in this table.
Page URLNLink to a page where this exception was thrown.

System History

System History storage displays the record field changes in all tables in the human-readable format.

To access System History, navigate to the System Logs → History (or, in general, follow the link looking like {your_instance_url}/list/sys_history)

Record Deletion Log


This storage keeps information about deleted objects. You can also restore them. 

Note

You cannot create and edit records in the Record Deletion Log (sys_record_deletion_log) table. Only users with the admin role can read and delete them.

To access this storage, navigate to System Logs → Record Deletion Log.

Info

Deletion logs are only available to tables with the selected Record Deletion Logging checkbox. See the Table Attributes article to learn more.

If you need to find any specific records or to sort them in any a particular order, then you can do this using use a filter tool in at the top of the page. Use  Use the Condition Builder to build to configure the filter filters that will fit your needs most.

FieldMandatoryDescription
Table NameNTable name to which the deleted record belongs.
RecordNThe ID of the deleted record.
Parent RecordN

The ID of the deleted record that caused deletion of the current record: if the record A causes deletion of record B, and this causes deletion of record C, then for the C record this field will display record A ID (as the initial cause). 

This field is populated in case the On Delete attribute in the reference is CascadeSee the Reference Fields article to learn more.

UsernameNUser who initiated the record deletion.
JSONN

This field stores deleted record attributes in JSON format as an associative massive.

Code Block
languagejs
themeEclipse
{"sys_id": 162212096614481484, "title": "Smith", "sys_created_at": "2021-05-27 13:09:26", "sys_created_by": 155931135900000001, "sys_updated_at": "2021-05-27 13:09:26", "sys_updated_by": 155931135900000001}


Restoring a record


To restore a record, perform the following steps:

  1. Navigate to System Logs → Record Deletion Log.
  2. Find the record you need using the list search or the Condition Builder:
    • choose one or several records by selecting the checkbox at the left
    • open the record you need.
  3. Click Restore.
Info

The restored record will have the attributes described in the JSON field. The system restores record version as it was just before the deletion.


Note

Records are restored one by one, independently from each other. For example, if deletion of record A causes deletion of records B and C, and then record A is restored, records B and C will remain deleted. They need to be restored additionally.

Log Archiving


With time, instance log storage grows over. And at most of the time, logs for the last two weeks or month are needed to analyze.

Log archiving engine allows saving deprecated logs so they do not affect system performance.

How it works


Archiving engine is not active by default. To activate it, please complete the steps below:

  1. Navigate to System Scheduler → Schedule Script.
  2. Go to the one of the Run Log Archiving record delivered and select the Active checkbox.
  3. Click Save or Save and Exit to apply changes.
Info

Default supply includes three archive scripts with different starting time: 01 AM, 03 AM and 05 AM. You can specify another archiving execution time and periodicity by modifying existing records or by cloning them with the Make a copy UI action and modifying the copy.

Archiving background process performs operations as described below:

  1. Gather logs which are the most outdated to this date.
  2. Pack them into an archive.

The script determines the oldest log from three tables as listed: sys_log, sys_log_script, sys_log_exception. After that, outdating check is performed (are these logs outdated today or not). For this, the simple.logs.rotate_period_in_days property is added allowing to define logs rotating period in days. If a period is not defined, then the default value is 30 days.

Managing log archives

To unpack a log archive, please complete the steps below:

  1. Navigate to System Logs -> Archive.
  2. Find the date you need the logs for and go to the specified logs record.
  3. On the record form, click on the Unpack button.
  4. After finishing, all records will be available in relevant tables.

To pack a log archive, please complete the steps below:

  1. Navigate to log record.
  2. Click on the Archive unpacked data button

Click on the value in the Sys column and open up the specific history record.

History record form fields

FieldDescriptionTable nameThe table name Field nameThe changed field.RecordThe record ID.Old valueOld record value.New valueNew record value.Type

Change type:

  • Update;
  • Delete;
  • Insert.
UsernameUsername of the change originator.Sys updated by Reference to the user who has updated record in this table.Sys created byReference to the user who has created the record in this table
  1. .


Table of Contents
absoluteUrltrue
classfixedPosition

...