FlowForce Server provides a logging mechanism to register all kinds of events and the time when they occurred (such as job outcome events, configuration change events, errors, and so on). You can view all the log events from a dedicated page, see Viewing the Job Log. Note that the log events can significantly increase the size of the FlowForce Server internal database over time. For this reason, the log must be periodically archived or cleaned up using the archive-log or truncate-log /system/maintenance functions. There are also other settings available that help you keep the size of the log within reasonable limits, as further described on this page.
The logging that takes place in FlowForce Server can be of two types:
1.Default system logging that does not require manual intervention of any kind. This kind of logging is taken care of by the system and does register all events, but keeps the size of each log record up to a certain limit, for better system stability and performance. If the system logging does not provide enough level of detail, or if you find out that certain log entries (such as parameter values in steps) are truncated because they are too long, you can use explicit logging, as described next.
2.Optional (explicit) logging that you can enforce from the job configuration page. The job configuration page provides a Log button that you can optionally enable next to each parameter which you are interested to track in the log. Doing so will log the full value of that parameter when the job runs. In addition, you can embed any FlowForce expression inside the log expression function in order to request that that expression be logged explicitly. Again, this will log the expression in full and its value will not be truncated. FlowForce Server does not limit the size of entries logged as a result of explicit logging.
If you do not want to use explicit logging for whatever reason, you can alternatively change the default size of log entries maintained by the system.
Changing the default log size to a higher value may impact system stability and performance, so exercise this option carefully. The recommended approach is to use explicit logging, as mentioned above.
To view or change the default size of log entries:
1.Log on to the FlowForce Web administration interface.
2.Go to Administration | Settings and observe the parameters grouped under "Logging limits".
Notice that there are two kinds of logged entries: string types and list types. Consequently, there are two parameters to control the size of each type.
Default string value logging limit
Specifies the default length of log entries that are of type "string". If a log entry exceeds this value then long arbitrary values such as file paths will be truncated.
Default list value logging limit
Same as above, applies to log entries that are of type "list".
Recurse into sublists
This setting affects jobs which operate on lists that contain other lists as children. Set this value to instruct FlowForce to look N levels deep for logging purposes.
The settings in the "Instance logging" section specifically affect the level of information reported in the Instance log page.
Logged messages can have severity levels, in this order (from lowest to highest): information, warning, error. The "Instance logging" parameters make it possible to skip logging of certain messages according to their severity. You can also configure the amount of tracing information that should be stored by FlowForce Server, or completely disable retention of logs. The image below illustrates the default settings:
Clearing the Retain log check box has the effect that no information is reported at all in the Instance log page.
The Messages severity option specifies what messages should be retained:
No messages are kept
Keep errors and critical messages
Keep errors, critical messages, and warnings
Keep errors, critical messages, warnings, and information messages
This is the most verbose option. All possible messages are kept, regardless of their severity.
The Execution trace parameter specifies the amount of tracing detail that should be stored:
No tracing information is kept
Keep streams but exclude traces
Keep traces but exclude streams
Keep every possible level of tracing information.
The "Instance logging" settings described above constitute a "rule". You can create custom rules, in addition to the default one, by clicking the button. This makes it possible to apply rules conditionally, based on the outcome of the job, which can be one of the following:
The job is considered successful.
The job execution has failed.
Stopped by user
The job was stopped by user action, see Stop Jobs.
The service was stopped before the job could finish, or FlowForce Server crashed.
The rules defined on this page are evaluated from top to bottom. If the job outcome matches any of the outcomes listed above, the rule is matched. The first matching rule wins.
For example, the configuration illustrated below retains the full message log if the job execution was not successful. In other words, the first rule will be triggered if the outcome is "Failed execution" or "Stopped by user" or "Interrupted". On successful execution, the "Default" rule will be triggered instead, and, even though the log messages will be kept, no tracing information will be available.
Note that you can add all the custom rules only before the default rule, not after it. To change the order of rules, use the Up and Down buttons. These buttons are enabled only when there are three or more rules.
If you define custom rules, it is advisable to use the default rule as a "catch all" filter, in case none of the rules before it has matched.
You can create logging rules not only globally at application level, but also for specific FlowForce Server jobs. Note that, if you create a rule on a job that has sub-jobs, then the rule will apply to all the sub-jobs as well.
To set logging rules for a job:
1.Open the job configuration page.
2.Click the Logging Settings button in the job configuration page.
3.Click New Instance Logging rule.
To set logging rules for multiple jobs:
1.Click Configuration and open a container.
2.Select one or more jobs (or the entire container), and then click Logging settings for selected jobs. A dialog box appears where you can refine the selection if necessary:
3.Click Change Logging Settings.
4.Click New Instance Logging rule.
All the logging configuration settings work in the same way as described above in the "Rules" section.
If you have defined logging rules both at object level and at application level, then the priority is established as follows:
•The logging rules defined at object level are checked first.
•If there is a match found at this level, the rule is applied and the rules at application level are no longer checked.
•If there is no match found at this level, the rules at application level are checked.