All Optymyse services use Gurock SmartInspect for their logging. This means that the log settings are the same for all services. Each service has its own configuration file, which defines the log location, rollover settings, etc.
Each service configures its logging in a configuration file, which will be located (generally) in C:\Program Files\SJS Solutions\Optymyse\[service name]\[service executable].config. The config file is an XML format file, and care must be taken when editing this file to ensure that it is valid XML with the correct entries, otherwise the service may not start, or may exhibit unexpected behaviour in service.
There are three configuration parameters in the configuration file related to logging:
Note: LogOption may be LogPath in some services
This is the most complicated setting, but even so, it follows a logical structure which should be easy to recreate.
Step 1: Tell the system to log to a file
The first step is to tell the logging system that you want to log to a file. Most services have "pipe()" as their default setting; simply replace "pipe" with "file".
Step 2: Location of the log file
The second step is to tell the system where the log file should be. In general, we recommend logging to the ProgramData directory (C:\ProgramData\SJS Solutions\Logs); however, for systems with small "C" drives and large data drives ("D", "E", etc.), you may select any directory that is appropriate. Inside the brackets after "file", add the following:
Note that backslashes must be doubled up (C:\\ instead of C:\), and the file extension should be ".sil". [name-of-service] may be anything you like, but to make life easier, choose a name that describes the log contents, e.g. Display.sil for the display driver; connector.sil for the connector.
Step 3: Restrict the log file size
In order to prevent detailed logging from overrunning the file system & using all of the disk space, we need to set a maximum file size, and a maximum number of files. This is achieved by adding the following settings:
This will configure the maximum file size to 0.5GB, and the maximum number of files to 10 (i.e. approx 5GB). If you have a large disk available for logging, feel free to increase the maxparts figure to whatever you feel necessary; but don't increase maxsize beyond 512000.
Note that each setting should be comma-separated, as per the example below.
Your configuration line should now look something like this (ignore any wrapping):
file(filename=C:\\ProgramData\\SJS Solutions\\Logs\\Edge.sil, maxsize=512000, maxparts=10)
Step 4: Start a fresh log every day
The final setting is to start a fresh file every day. Add the following setting (with commas where applicable):
Your entire logOption setting should now look something like this:
<add key="logOption" value="file(filename=C:\\ProgramData\\SJS Solutions\\Logs\\Edge.sil, maxsize=512000, maxparts=10, rotate=daily)" />
LogLevel can be set to one of the following (all caps):
- DEBUG - Only set to this level if SJS have asked you to. This will create very large and detailed logs which cycle rapidly, and can (on large call centres) impact the performance of Optymyse.
- INFO - This provides detailed logs, and again should only be set to this level if SJS have requested it.
- WARNINGS - This log level records any errors & warnings. Set to this level if you are experiencing transient issues, or if SJS have requested it.
- ERRORS - This is the default log level, and records any internal or externally forced errors which may affect the wallboards. In normal use, this will result in small or no logs.
- NONE - This turns off ALL logging, and is not recommended.
LogEnabled can be set to true or false; if set to false, is the equivalent of setting LogLevel to NONE.
Most settings are not case sensitive, however, LogLevel should be all capitals. Filenames are not case sensitive, but will be created in the case you write in the configuration file.
Note that to save the configuration file "in place", you will need to edit it with elevated permissions. We recommend a 3rd-party text editor such as Notepad++. Alternatively, save the changed file to the desktop & paste it back to the proper location (that will ask for elevated permissions).
Applying configuration changes
To apply changes you've made to the configuration files, you need to re-start the service(s) affected. For most services, this can be done at any time without materially affecting the system (e.g. restarting Display will cause all of the wallboards to re-start at their first page). However, restarting the connector service MAY result in data loss (depending on the connector). Please ask SJS for details of your specific connector.
My service won't start now!
If the service fails to re-start after a configuration file change, please check carefully to ensure the XML is still correctly formatted, all the double quotes are paired, and that any settings are in the correct section (between the <appSettings> </appSettings> tags), and that they follow the correct format (<add key="key name" value="value name" \>). If you've put any double quotes inside a string, they need to be doubled up (e.g. filename=""c:\""). If you've checked everything and the service still won't start, please contact SJS support by e-mailing firstname.lastname@example.org, and attach a copy of your configuration file.