Logging Questions

Revision as of 21:13, 5 July 2011 by 68.189.243.50 (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Logging

FAQ

  • How to redirect standard output to syslog?

ASP normally redirects standard output/standard error to a file located in var/log. You go back to the default console output for these streams by setting ASP_STDOUT_LOGFILE (version 5.1+) or ASP_CPM_LOGFILE (version 5.1 or lower) to "console". From there you redirect in the normal fashion, see [this article: http://stackoverflow.com/questions/665509/redirecting-standard-output-to-syslog]

However, note that using the OpenClovis logging mechanism is preferred over the standard output. And all OpenClovis logs already go to the files "sys.XXX" and "app.XXX". The console logging is recommended for debugging only.

  • How to redirect a log stream to syslog?
The ClLogStreamAttributesT object has a field "syslog". Set this field to TRUE before opening the log. This can also be done for "precreated" streams in the clLog.xml by setting the "syslog" tag to "yes". For example:
          <stream name="appStream">
            <fileName>app</fileName>
            <fileLocation>.:var/log</fileLocation>
            <fileUnitSize>1500000</fileUnitSize>
            <recordSize>300</recordSize>
            <fileFullAction>ROTATE</fileFullAction>
            <maximumFilesRotated>3</maximumFilesRotated>
            <flushFreq>20</flushFreq>
            <flushInterval>20000000</flushInterval>
            <syslog>yes</syslog>
          </stream>