8.2.2Logging for debugging
The telnet command to control the logging in the content management system is simply called "log". With this command you can add or delete file loggers, switch log levels on and off and even redirect the actual server log into a running shell.
Additionally, the cmsWorks log mechanism may store exceptions, too. These exception can be viewed using the "exception" command in the telnet server shell.
Description of these two commands:
Command | Description |
exception | cmsWorks is able to store exceptions in its log messages. These exceptions can be listed in intervals, exported in an exception list file, flushed (emptied) or they can simply be printed on screen using the "exception" command. |
log | The "log" command is the central command to maintain logging in cmsWorks. "log status" gives a list of all active loggers (i.e. file loggers, loggers that print to the telnet consoles etc.). |
Logging in cmsWorks
Logging in cmsWorks is done using one of the following log levels: "debug", "trace", "info", "warn", "error", "fatal", "inform extern". The latter tries to send an email to pre-defined email receivers, the first ones are for internal logging within cmsWorks.
The log command manages the logging and can be used to log into files ("log add file <filename> <loglevels>") or even log to the actual telnet server session ("log link info" writes the info-level logs to the telnet server). Instead of enumerating one or more log levels (i.e. "log link debug info") you can use the log level word "all" (i.e. like "log link all" instead of "log link debug trace info warn error fatal").
For more information type "help log" into the telnet server.
(Re)Viewing exceptions in the cmsWorks log
Examples for the telnet server exception command are
- "exception count" (returns the number of exceptions stored in the exception log)
- "exception print 3" (prints the third exception in the exception log)
- "exception clear" (clears the exceptions from the log and frees the used memory of these exceptions)
- "exception export <filename>" (exports the exception log into a file on the server).
For more information type "help exception" into the telnet server.
