Ns log

From AOLserver Wiki
Jump to: navigation, search

Man page: http://aolserver.com/docs/tcl/ns_log.html


NAME

ns_log - Send messages to the server log

SYNOPSIS

ns_log severity string ?string ...?

DESCRIPTION

This command sends a messages to the server log with severity and the one or more string args concatenated together with a single whitespace separating each arg.
Note that this only queues messages for the log and does not actually guarantee that the message is immediately written to the log. The server can be instructed to queue messages in the cache via ns_logctl hold.
Log messages are written to the server log which is the file that is returned from ns_info log.
The following are the acceptable severity levels:
notice - Something interesting occurred.
warning - Something that could mean something bad occurred.
error - Something bad occurred.
fatal - Something extremely bad occurred. The server will generally shut down after logging the message.
bug - Something occurred that implies that there is a bug in the code.
debug - If the server is in Debug mode, the message is printed. Debug mode is specified in the [ns/parameters] section of the configuration file. Otherwise, the message is not printed.


EXAMPLES

   # note that the log message is one single arg
   % ns_log notice "this is a test"
   # note that each word is a separate arg to ns_log
   % ns_log error this is an example error log string

SEE ALSO

ns_info log, ns_logctl, ns_logroll

Category Documentation - Category Core Tcl API