Execution Log
The results of rule evaluation and action execution are written into the execution log. This log can be very useful when checking whether business rules behave as expected (especially when testing new configuration – see Testing Mode).
The log record consists of the record timestamp, the name of the business space in which the user that has issued the request operates and the name of the user. For example,
2004-06-18 20:26:07,760 AIS#admin -Executing action Associate.RegisteredOn=CURRENT_DATE from rules of object Associate
Here the name of the business space is “AIS” and the name of the user is “admin”.
The execution log supports different levels of logging:
Rules only
This is the default level – only evaluation/execution results of rules attached to business objects or used in processes are recorded in the log. Evaluation and execution results of scheduling rules are not shown.
All server events except timer and SQL events
At this level the log contains records of all requests that the server receives. It also has results of rule evaluation/execution (except scheduling rules)
All server events excluding SQL
This is the same as the previous level. Evaluation/execution of scheduling rules are also included in the rule log
All server events including SQL
This is the most verbose level. This is the same as the previous level, but the rule log also includes records of all SQL commands that Aware IM sends to the database.
The levels may be set up using the Aware IM Control Panel (Settings/Logging menu item) or in the logger.props
file located in the BIN
directory of the Aware IM Server installation.
When you run the Settings/Logging command you can also specify whether the system will log any events into a log file or not. If you tick the corresponding checkbox the system will store events of all applications running in the production mode in the file AwareIM/bin/main.log
, and it will store events of all applications running in the testing mode in the file AwareIM/bin/test.log
Log Viewer
The execution log may be viewed using the Aware IM Control Panel. There are several menu items that can view the log:
- View/Production Log menu item – opens the current log for all applications running in the production mode
- View/Testing Log menu item – opens the current log for all applications running in the testing mode
- File/Open Log File – opens the specified log file
Aware IM displays the log as a tree structure where every node represents a single log record. The nodes of the tree are hierarchical – for example, all log records spawned by an external request (such as a request to start a process or update an instance of a business object) are children of the node representing the external request. This is illustrated on the picture below:
The picture shows execution of the DeleteTopic process – the corresponding nodes are expanded to show all details of the log. Note also that the Log Viewer shows different types of log records with different icons and colors. Using the Log Viewer one can quickly browse through the log and delve into the details of a particular request only when necessary.
Setting Logging Options
You can specify what each log record will contain by choosing the View/Log View Options menu item. This menu item opens a dialog where you can specify whether each record will contain timestamp, business space name and user name.You can also filter the log and display only records that belong to the specified user in the specified business space or to all users in the specified business space.
Traversing the log
It’s often useful to quickly traverse the log by only going through certain records, skipping records that you are not interested in. To do this you need to specify which records will be filtered out during traversal. This is done by selecting the Edit/Find Log Record menu item. In this menu command you specify your filtering criteria and then you traverse the log by pressing the F3 button. Each time you press this button the system will display the next log record that meets your search criteria.
The Edit/Find Log Record menu item opens a dialog where you can set the following options:
By text of the log message
Only log records containing the specified text will be traversed.
By business space name
Only log records that belong to the specified business space (and optionally to the specified user in this business space) will be traversed.
By message type
The following record types are supported:
EXECUTING ACTION
– these are records that indicate that an action of some rule is about to be executedADD ACTION TO THE AGENDA
– these are records that indicate that the conditions of a rule are satisfied and the actions of the rule are placed on the agenda of the rule engineSQL
– these are records that show SQL being sent to the databaseOTHER
– all records that do not belong to any of the categories above
By reply to process
Only log records that are involved in the execution of the specified process are traversed
By time difference with previous
Only log records that have timestamp that is different from the timestamp of the previous records by the specified amount or more are traversed. This can be very useful when identifying performance bottlenecks in the system. For example, if you specify 30 seconds than you will immediately go to log records that show operation where execution time was 30 seconds or more.