Quick Nav
See Also
Log Files
Appweb provides detailed logging regarding client accesses and the operation of Appweb. This is done via two log files:
- Error Log
- Access Log
This document describes the two logs and the information available in each log.
Error Log
The Error Log records the essential Appweb configuration, details of denied requests, and other trace information. The location of the Error Log file is specified by the ErrorLog configuration file directive and the level of logging is specified by the LogLevel directive.
The verbosity of the messages written to the error log can be specified by the LogLevel directive. The log level is a digit ranging from 0, the least verbose to 9 being the most verbose. For example, if you set the log level to 2, messages at levels 0 and 1 will be output to the log. Level 0 will only record errors. Level 2 is the default and will record denied accesses. Levels 3-9 will record various internal Appweb activities. You should be very careful with levels above 4 as the error log can grow very large with high log levels.
Here is a sample error log. Some lines have been manually wrapped to fit on the page.
appweb: 2: Configuration for Embedthis Appweb appweb: 2: --------------------------------------------- appweb: 2: Version: 4.0.0-B0 appweb: 2: BuildType: DEBUG appweb: 2: CPU: x86_64 appweb: 2: OS: MACOSX appweb: 2: Distribution: Apple 10.7.2 appweb: 2: Host: magnetar.local appweb: 2: Configure: --without-ejscript appweb: 2: --------------------------------------------- appweb: 2: Config File /Users/mob/git/appweb/src/server/appweb.conf appweb: 2: Set server root to: "/Users/mob/git/appweb/src/server" appweb: 2: Server Root "." appweb: 2: Activating module (Loadable) cgiHandler appweb: 2: Activating module (Loadable) espHandler appweb: 2: Activating module (Loadable) phpHandler appweb: 2: Activating the SSL provider appweb: 2: Loading OpenSSL module appweb: 2: Activating module (Loadable) sslModule appweb: 1: Started HTTP service on "*:80" appweb: 1: Started HTTP service on "*:443" appweb: 1: HTTP services Started at Fri Nov 11 22:01:00 2012 PST with max 10 threads
Each line in the error log is prefixed with source information. This follows the format:
program:logLevel
The log level is the verbosity level assigned to the trace information by Appweb.
The error log always contains a header detailing the high level Appweb configuration. It specifies what version of Appweb is being run, what handlers and modules are loaded, and what IP addresses are being listened to.
You may also specify the error log file and log level via the Appweb command line "-l" option. If you invoke Appweb with a "-l logSpec" command line option, it will override the ErrorLog and LogLevel directives.
Access Log
The Access Log records the details of each successful request served by Appweb. The access log file format is configurable and can log requests in a variety of formats. By default, it will log in the Combined Log File Format that is used by the Apache web server. The location of the access log file and its format is specified via the CustomLog configuration file directive.
The access log file is parsable by many open source and commercial log file analyzers. Here is a sample access log. Some lines have been manually wrapped to fit on the page.
localhost - - [Fri Dec 19 16:08:13 2003] "GET /
HTTP/1.1" 302 464
localhost - - [Fri Dec 19 16:08:22 2003] "GET /doc/index.html
HTTP/1.1" 200 8006
localhost - - [Fri Dec 19 16:08:22 2003] "GET /doc/css/doc.css
HTTP/1.1" 200 10588
localhost - - [Fri Dec 19 16:08:22 2003] "GET /doc/images/backLeft.png
HTTP/1.1" 200 16492
localhost - - [Fri Dec 19 16:08:22 2003] "GET /doc/images/backMiddle.png
HTTP/1.1" 200 464
localhost - - [Fri Dec 19 16:08:22 2003] "GET /doc/images/backRight.png
HTTP/1.1" 200 987
localhost - - [Fri Dec 19 16:08:22 2003] "GET /doc/images/graybar.gif
HTTP/1.1" 200 290
localhost - - [Fri Dec 19 16:08:24 2003] "GET /doc/index.html
HTTP/1.1" 304 167
localhost - - [Fri Dec 19 16:08:24 2003] "GET /doc/css/doc.css
HTTP/1.1" 304 167
localhost - - [Fri Dec 19 16:08:24 2003] "GET /doc/images/backLeft.png
HTTP/1.1" 304 167
localhost - - [Fri Dec 19 16:08:24 2003] "GET /doc/images/backMiddle.png
HTTP/1.1" 304 165
localhost - - [Fri Dec 19 16:08:24 2003] "GET /doc/images/backRight.png
HTTP/1.1" 304 166