Logging Options
The automatic logging facilities offered by the morphyc architecture are split into three parts, the platform, developer, and administration logs. For each type of logging the settings can be adjusted by clicking the appropriate Configure button on the Dashboard configuration screen. This will show a page like the example provided below.
For each type of log, the filename in which the information will be output needs to be specified. The log destination can be set to the same filename for each logging type to have all the logs output in the same file.
The platform logs contain information on how the platform is running, and will include any error information. This logging will be at a given level, determining how much output is produced.
The developer logs are wholly concerned with the XML messages flowing through the application. There are four different aspects of developer logging that can be controlled independently. Agent messages covers the information flowing between each agent, rule messages detail the state of the FactBase before each rule is fired, action messages detail the state of the FactBase after each action is performed, and rule checking messages indicate when each rule is being checked to see if it can fire.
Administration logs contain details on session and caching activities, along with details of which assets are being cached.
For the development and platform logging types it is possible to override the settings on a per agent (node) basis. This is done by adding a Logging Override detailing the agent it is for. This then contains attributes for all of the settings for the particular logging type, as shown in the previous example. For these overrides to be taken into account, the appropriate Check Log Overrides flag must be enabled. The agent id values that need to be entered here can be found from the dashboard log views, or alternatively from the Node Viewer screen within the studio. The entered id does not need to be a full value, for example, if you did not want to log anything from the Example project (in a multi-project application), you could just enter mvc-Example
in the Agent ID field, and set the rest of the options accordingly.
This log overriding functionality is very useful for more complex applications where you would otherwise get very large log files generated. You can use this capability to filter the logs to just the ones you are interested in, making the resulting files smaller and easier to view and process.
Archiving Logs
Archiving is enabled using the Archive Previous Logs option. If enabled you need to set the Max Backup Index and Max File Size values. The max backup index attribute indicates the number of rolling archives to keep and the max file size indicates the maximum size of the log file before it is archived. The max_file_size parameter is stated in bytes, e.g. 1048576 = 1MB. If the archive previous log is set to false or the max backup index attribute is set to 0 then only one log file will be created.
It is also possible to direct all the logging output to the screen as well as to the log files, by setting the output_to_screen attributes to 'true'.