Quick Nav
CustomLogErrorLog
LogLevel
See Also
Logging OverviewConfiguration
Configuration Directives
Logging Directives
CustomLog
| Description | Define the location of the access log and its format. |
| Synopsis
|
CustomLog path format |
| Context | Default Server |
| Example
|
CustomLog access.log "%h %l %u %t \"%r\" %>s %b" |
The format string argument defines how Appweb will record HTTP accesses to the access log. The following log format specifiers are supported:
| Format Specifier | Description |
| %%
|
Percent sign
|
| %a
|
Remove IP address
|
| %b
|
Bytes written back to the browser including HTTP headers. If zero bytes, a
'-' is written.
|
| %B
|
Bytes written excluding HTTP headers.
|
| %h
|
Remote host
|
| %l
|
Remote log name if supplied
|
| %O
|
Bytes written including headers. If zero bytes, '0' is written.
|
| %r
|
First line of the request
|
| %s
|
Request HTTP status code. |
| %t
|
Time
|
| %u
|
Remote user name
|
| %{header}i
|
Content of request header called "header"
|
| %>s
|
Response code. Same as %s.
|
ErrorLog
| Description | Defines the path and format of the Appweb error and trace log |
| Synopsis
|
ErrorLog logSpec |
| Context | Default Server |
| Example
|
ErrorLog error.log |
The logSpec argument has the following format:
pathName[:level][[,moduleName[:level]]...][.maxSize]
The pathName is an absolute or ServerRoot relative path. The level argument defines a logging
verbosity level between 0 and 9 with 9 being the most verbose.
The following levels are generally observed:
| Level
|
Usage
|
| 0
|
Essential messages, fatal errors and critical warnings
|
| 1
|
Hard errors
|
| 2 | Configuration setup and soft warnings |
| 3
|
Useful informational messages
|
| 4
|
Debug information
|
| 5-9 | Increasing levels of internal Appweb trace useful for debugging
|
ModuleNames are internal Appweb names given to various functional modules. For example: "esp" is the
name given to error information from the Embedded Server Pages handler.
The maxSize argument defines how large the log may grow in MB before it is rotated. When rotated,
the old log will be renamed with ".old" appended to the pathName. The default size is 5 MB.
If the LogLevel directive is used, it will override the level specified via the ErrorLog directive
for general logging. Per-module levels will not be affected.
Examples
To log trace at the level specified by the LogLevel directive to the file named error.log:
ErrorLog error.log
To log messages from "myHandler" at level 9, but log everything else at level 2:
ErrorLog error.log,myHandler:9
LogLevel
| Description | Defines the verbosity of messages to the error log |
| Synopsis
|
LogLevel errorLevel |
| Context | Default Server |
| Example
|
LogLevel 2 |
Normally a level of 2 is best as it will record the Appweb configuration, denied requests and general errors.