Stderr-log

From Resin 3.0

Revision as of 23:09, 27 February 2006 by Sam (Talk | contribs)
Jump to: navigation, search


Capture output sent to System.err.

directive meaning default
path output path for the stream either path-format or path is required
path-format the name of a file to write the log to, date format escape sequences are replaced with the current date and time either path or path-format is required
timestamp a timestamp in date format to use at the beginning of each log line. no timestamp
rollover-period how often to rollover the log. Specify a period in days (15D), weeks (2W), months (1M), or hours (1h) none
rollover-size maximum size of the file before a rollover occurs. Specify a size in bytes (50000), kb (128kb), or megabytes (10mb) 1mb
archive-format the format for the archive filename when a rollover occurs path + ".%Y%m%d" or path + ".%Y%m%d.%H" if rollover-period < 1 day

Environments

stderr-log can appear in any environment (i.e. within a server, host, or web-app).

Usage of the stderr-log overrides a previous usage in a containing environment. For example, specifying stderr-log as a child of a web-app causes a redirection of System.err for that web application only, and will override the System.err location in the enclosing host.

Examples

resin.conf configuration to capture all System.err output to log/stderr.log:

<resin xmlns="http://caucho.com/ns/resin"
       xmlns:resin="http://caucho.com/ns/resin/core">

  <stderr-log path='/var/log/foo/stderr.log'
              rollover-period='1W'/>
 
  ...

host configuration to capture all System.err output within a host to log/stderr.log. Unless a web-app overrides with it's own stderr-log, all web-apps in the host will write to the same output file.

...
<host id='foo.com'>
  <stderr-log path='/var/log/foo/stderr.log'
              rollover-period='1W'/>
  ...
</host>
...

See also

stdout-log 
Capture output sent to System.out
Logging 
A general overview of logging facilities in Resin
Rollover 
Details about rollover options
Archiving 
Details about archiving options
Personal tools