Quick Nav
See Also
Log Files
Appweb provides detailed logging regarding client accesses and 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 < href="dir/log.html#logLevel">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: Host: saturn.local appweb: 2: CPU: i386 appweb: 2: OS: MACOSX appweb: 2: Distribution: Apple 10.5.6 appweb: 2: OS: MACOSX appweb: 2: Version: 3.0A.2.16081 appweb: 2: BuildType: RELEASE appweb: 2: Started at: Mon Mar 9 15:56:03 2012 appweb: 2: -------------------------------------------- appweb: 2: Server Root "/Users/mob/hg/appweb/src/server/." appweb: 2: Document Root for Main Server is "/Users/mob/hg/appweb/src/server/web" appweb: 2: Set connector "netConnector" appweb: 2: Activating module (Loadable) authFilter appweb: 2: Add filter "authFilter" to location "" for all extensions appweb: 2: Activating module (Loadable) rangeFilter appweb: 2: Add filter "rangeFilter" to location "" for all extensions appweb: 2: Activating module (Loadable) chunkFilter appweb: 2: Add filter "chunkFilter" to location "" for all extensions appweb: 2: Activating module (Loadable) phpHandler appweb: 2: Add handler "phpHandler" to location "" for extensions ".php" appweb: 2: Activating module (Loadable) ejsHandler appweb: 2: Add handler "ejsHandler" to location "" for extensions ".ejs" appweb: 2: Set handler "ejsHandler" for location "/ejs/" appweb: 2: Activating module (Loadable) egiHandler appweb: 2: Add handler "egiHandler" to location "" for extensions ".egi" appweb: 2: Set handler "egiHandler" for location "/egi/" appweb: 2: Activating module (Loadable) dirHandler appweb: 2: Add handler "dirHandler" to location "" for all extensions appweb: 2: Activating module (Loadable) cgiHandler appweb: 2: Add handler "cgiHandler" to location "" for extensions ".exe .cgi .cgi-nph .bat .cmd .pl .py" appweb: 2: Set handler "cgiHandler" for location "/cgi-bin/" appweb: 2: Activating module (Loadable) fileHandler appweb: 2: Add handler "fileHandler" to location "" for extensions ".html .gif .jpeg .png .pdf """ appweb: 2: Activating the SSL provider appweb: 2: Loading OpenSSL module appweb: 2: Activating module (Loadable) sslModule appweb: 2: Document Root for 127.0.0.1:4443 is "/Users/mob/hg/appweb/src/server/web" appweb: 1: Starting host named: "127.0.0.1:7777" appweb: 1: Starting host named: "127.0.0.1:4443" appweb: 2: Listening for HTTP on *:7777 appweb: 2: Listening for HTTPS on *:4443 appweb: 1: HTTP services are ready (single-threaded). appweb: 2 [Mon Mar 9 18:54:23 2012] appweb: 1 Error: 404 "Not Found" for "/myFile.html", file "/var/appweb/web/myFile.html":
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 parseable 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