The log option indicates whether to log events such as errors that occur in FairCom RTG. This feature might be helpful for diagnostics purposes.
Attributes
Value |
Effect |
Synonyms |
file |
Specifies the log file name. If omitted, the log messages are redirected to the standard error stream (stderr). |
|
whoformat |
Indicates the format of the log entry portion that prints which client application logged the entry. The value of <log whoformat=""> is a character string that can contain substitution specifiers such as %p for process ID, %t for thread ID, etc. The default value is <log whoformat="%08Xt>. This prints the thread ID ("%t") in uppercase hexadecimal format ("%Xt") with an 8 digits fixed width ("%8Xt") left-padded with zeroes (0) instead of spaces ("%08Xt") followed by a literal "> " as separator ("%08Xt> "). |
|
Accepted Values
Value |
Effect |
Synonyms |
---|---|---|
yes |
Turns on logging. This option has the same effect as turning on the <error>, <warning>, and <info> sub-options. |
y, true, on, 1 |
no |
Turns off logging. This is the default value. |
n, false, off, 0 |
If the log option is enabled, it may accept the following sub-options to specify which event to log:
<debug> log option
<error> log option
<info> log option
<profile> log option
<warning> log option
If the log option is enabled and no sub-options are specified, it has the same effect as turning on the <error>, <warning>, and <info> sub-options.
Examples
The following example turns on implicit logging of errors and generic information to standard error stream:
<log>yes</log>
The following example turns on explicit logging of errors and generic information to file mylog.txt:
<log file="mylog.txt">
<error>yes</error>
<info>yes</info>
</log>
The following example turns on only error logging:
<log>
<error>yes</error>
</log>
Substitution Specifiers
Substitution specifiers can be used in the <log file> configuration attribute. The <log file> attribute can contain substitution specifiers to build the log file name using (for example) an environmental variable.
Example:
The following setting creates a different log file for each Windows user:
<log file="%(USERNAME).log">yes</log>