Log Files
Custom Log Files
The Notification Processor has the ability to generate log files during its operation. By supplying the LogIdentifer parameter to the various script functions a log file is automatically created or appended to. The LogIdentifier determines the filename of the resulting log file. Typically these would be based on the current activity or transaction, thereby creating separate log files for each event.
The log files are useful when trying to determine why a particular Notification Processor function might have failed, the WriteLog function provides the ability to include custom log entries to help debug script related issues.
The log files are created on the M-Files server the default location for log files is: C:\ProgramData\PentagonDOCS\Notifications\Logs
Server Processor Log File
In addition to custom log files the Notifications Processor will automatically log any unhanded Exceptions or errors that occur, in a situation where a LogIdentifier has not been provided to a Method the server log can provide basic details of any exception or error that may have occurred.
If there is an issue writing to any of the log files such as file/folder access then the log message will be directed to the Windows Event Log
Example Log file
Filename: {581729DD-F8A8-4C19-8108-DFB0DDFED2E8}.log
02/08/2019 17:21:10 Send External Notification
02/08/2019 17:21:10 Flattening any user groups...
02/08/2019 17:21:10 Processing Substitute Users...
02/08/2019 17:21:10 ...Substitute Users set to be ignored
02/08/2019 17:21:10 Adding external email address (if any)...
02/08/2019 17:21:10 Removing blank or invalid email addresses...
02/08/2019 17:21:10 Removing duplicate email addresses...
02/08/2019 17:21:10 Raising New Notification...
Automatic Removal of Log Files
Creation of log files can be based on an arbitrary identifier such as ActivityID or TransactionID, the number of log files can quickly accumulate. The Notifications processor will automatically remove log files older than 24 hours.
This setting can be increased or decreased via the Administration tool