Logging is configured on a per service basis for each CygNet service, by setting the values of several keywords in its service configuration file. Some logging options can also be entered via command-line parameters.
The service configuration file (Service.cfg) for each service is located in the CygNet\Services\Service folder on your host server. In the file, use the following keywords to define logging for your service.

See Service Configuration Keywords for each Service for more information about using these keywords.
Associated Services keywords include an ELS keyword.
| Keyword | Definition |
|---|---|
|
ELS |
The Site and Service name of the service’s ELS, in Site.Service format. |
Use this keyword value to specify the ELS or ELSALM to which log files for your service will be written. Type in the desired ELS Site and Service name, in Site.Service format, and save the file.
Note: The logging keyword that defines the logging retention period (the number of days an ELS retains logging information) is a configuration parameter of the associated ELS, and is specified within that ELS service configuration file. See the Retention Period Keywords for ELS and for ELSALM for more information.
Logging keywords include LOGMASK and LOGFILE types. Use these keywords in conjunction with one another to specify logging behavior for the selected service.
The LOGMASK keywords define what types of events are written to the designated logging service and to the service log files.
| Keyword | Definition |
|---|---|
|
Specifies the types of service events to be logged to the associated ELS (specified in the ELS keyword). To disable logging to the ELS, comment out the ELS keyword for the selected service. See the Note below this table for more information about the keyword values. See LOGMASK_ELS in the Logging section of this Help for more information. The LOGMASK_ELS ( LMask ELS) info item will report the value of this keyword. |
|
|
Specifies the type(s) of service events to be logged to the service’s log file ([file name].log). During the current session of the service, data is written to the current log file. Log file names follow the naming convention of the selected logging mode (as set by the LOGFILE_MODE keyword value). See the Note below this table for more information about the keyword values. See LOGMASK_FILE in the Logging section of this Help for more information. The LOGMASK_FILE (LMask File) info item will report the value of this keyword. |
For each LOGMASK keyword (LOGMASK_ELS or LOGMASK_FILE), use the following values to specify the type(s) of information to log to that location. Valid keyword values can be used alone or in combination.
Note: Use the following keyword values to set logging options for the LOGMASK_ keywords.
Example
A value for LOGMASK_ELS might be CONTROL + EXCEPTIONS.
A value for LOGMASK_FILE might be CONTROL + EXCEPTIONS + WARNING + PROG_STAT.
The LOGFILE keywords work together to define the way log file sets are maintained by the service.
| Keyword | Definition |
|---|---|
|
Specifies the maximum number of log files that a service will create before it starts re-using log files. For example, a count of two will produce SVC001.log, then SVC002.log, and then start back at SVC001.log, where SVC is the name of the service. Specify any value from 2 to 100. See LOGFILE_FILE_COUNT in the Logging section of this Help for more information. The LOGFILE_FILE_COUNT (File Cnt) info item will report the value of this keyword. |
|
|
When the value of the LOGFILE_LIMIT_MODE keyword is set to SIZE, this keyword specifies the maximum size (in megabytes) allowed for a log file, before logging will be continued using the next log file. Possible maximum size values are user-determined, respecting the limits of your specific system configuration. The default value is 100 megabytes. When the specified limit is reached, the log finishes the current line, closes the current file, and then continues logging in the next available log file. See LOGFILE_FILE_SIZE in the Logging section of this Help for more information. The LOGFILE_FILE_SIZE (File Size) info item will report the value of this keyword. |
|
|
Specifies how to limit the size of each individual log file. Options are LINE (maximum line count is determined by the LOGFILE_LINE_COUNT keyword) or SIZE (maximum file size in megabytes) determined by the LOGFILE_FILE_SIZE keyword). The default value is LINE. See LOGFILE_LIMIT_MODE in the Logging section of this Help for more information. The LOGFILE_LIMIT_MODE (Limit Mode) info item will report the value of this keyword. |
|
|
When the value of the LOGFILE_LIMIT_MODE keyword is LINE, this keyword specifies the maximum number of lines per log file. When the specified line count is reached, the log file is truncated at the limit point, and logging is resumed using the next available log file. Specify any value from 1000 to 1000000. See LOGFILE_LINE_COUNT in the Logging section of this Help for more information. The LOGFILE_LINE_COUNT (Line Cnt) info item will report the value of this keyword. |
|
|
Specifies the operational mode for the log file, that is, how log files are maintained. Options are LEGACY or EXTENDED. The default value is LEGACY. See LOGFILE_MODE in the Logging section of this Help for more information. The LOGFILE_MODE (Logging Mode) info item will report the value of this keyword. LEGACYIn LEGACY mode two log file sets are maintained: the current log file set and the previous log file set. When a service is stopped and restarted, a new log file is generated and log files from the previous session are renamed as follows:
EXTENDEDIn EXTENDED mode multiple log file sets are created and maintained: the current log file set and multiple previous log file sets, up to the limits specified by the LOGFILE_FILE_COUNT and either the LOGFILE_LINE_COUNT or LOGFILE_FILE_SIZE keywords. When a service is stopped and restarted, the most recent log file is opened to resume logging with current information. A new log file is created only when the LOGFILE_LINE_COUNT or LOGFILE_FILE_SIZE for the file is exceeded, as follows:
|
Use the following standard command-line parameters to control log file creation.
|
/MAX_LOG_FILES:<maximum_number_of_log_files>
|
|
/MAX_LOG_LINES:<maximum_number_of_log_file_lines>
/MAX_LOG_SIZE:<maximum_size_of_log_file> |
The log file is written to the current working directory.
The following standard command-line logging level parameters can also be used to define log file content.
|
/LOG_ALL
/LOG_NONE
/LOG_CONTROL
/LOG_EXCEPTIONS
/LOG_WARNING
/LOG_PROG_STAT
/LOG_MIN_TRACE
/LOG_MAX_TRACE
/LOG_ENTER_EXIT
/LOG_STATISTICS
/LOG_PROFILE_MIN
/LOG_PROFILE_MAX |
Note: These options apply to most clients, services, and utilities. All options may not apply to all usages.
See Service Log Settings and Client Log Settings for more information about applicable logging options.