Back to Contents | GAS Configuration File Overview
The LOG element in the Genero Application Server configuration file specifies where messages are logged to, the format of the log messages, the type of information that is logged, and the maximum size of a single log message. By specifying multiple LOG elements, multiple logs can be created for a single application server.
By default, log messages are written to a daily log file in the $FGLASDIR/log directory.
<LOG>
<OUTPUT Type="DAILYFILE|PATH|CONSOLE">path/filename</OUTPUT>
<FORMAT Type="TEXT|XML" Timestamp="ABSOLUTE|RELATIVE" PrintFullContexts="YES|NO" />
[ <CATEGORIES_FILTER>FILTERNAME [...]
</CATEGORIES_FILTER> ]
[ <RAW_DATA MaxLength="length" />
]
</LOG>
The LOG element may contain the following child elements (described below):
<LOG> <OUTPUT Type="DAILYFILE" /> <FORMAT Type="TEXT" Timestamp="ABSOLUTE"/> <CATEGORIES_FILTER>GAS PROCESS DEPRECATED</CATEGORIES_FILTER> <RAW_DATA MaxLength="100" /> </LOG>
The OUTPUT element specifies where the log messages are sent. It takes an attribute of Type and an optional path value.
There are three OUTPUT types:
Type | Description |
DAILYFILE | A new log file is created each day. If a path is specified, the log files are created and stored in the specified directory. If a path is not specified, the log files are created in the default log directory ($FGLASDIR/log). You do not need to specify a filename; the file is created each day using a naming convention of "gasd-YYYYMMDD.log", providing a date stamp for each log file. |
PATH | Log messages are written to the specified path/filename. Both the path and filename must be specified; if a filename is not specified, no log will be created. If the file does not exist, it is created with the first log message to record. This setting generates a single log file, which continues to grow as more log messages are written to it. It is the administrator's responsibility to occasionally back up and/or remove the log file, to prevent the file from growing too large and using up the allocated disk space. |
CONSOLE | Log messages are sent to standard output. |
The following examples would be valid for the OUTPUT element:
<OUTPUT Type="DAILYFILE" /> <OUTPUT Type="DAILYFILE">$(res.as.dir)/logfiles</OUTPUT> <OUTPUT Type="PATH">$(res.as.dir)/log/gasd_process_log.txt</OUTPUT> <OUTPUT Type="CONSOLE" />
The FORMAT element specifies the format in which log messages are sent to the specified output. It takes the required attribute Type and the optional attributes Timestamp and PrintFullContexts.
The type attribute specifies whether the message is formatted as plain text or XML. For log files written using the XML format, it is standard to use XSL to process the log messages and retrieve the desired data for further processing or analysis.
Type attribute valid values | Description |
TEXT | Writes to log in plain text. |
XML | Writes to log in XML format. |
The Timestamp attribute specifies what timestamp is used when recording log messages in the log file.
Type attribute valid values | Description |
ABSOLUTE | The server time. |
RELATIVE | The duration (length of time) from the start of the Genero Application Server. |
The PrintFullContexts attribute specifies when the gasd will log data. By default, the value is NO. Setting to YES is only for debugging purpose. This attribute is only appliable on XML format, it is ignore otherwise.
Type attribute valid values | Description |
NO | Write log information as soon as possible. |
YES | Wait for complete information before logging. |
The following examples would be valid for the FORMAT element:
<FORMAT Type="TEXT" Timestamp="ABSOLUTE" /> <FORMAT Type="XML" Timestamp="RELATIVE" />
The optional CATEGORIES_FILTER element specifies the type of log messages to be captured.You may specify multiple values within the CATEGORIES_FILTER values by listing multiple filter names, separated by spaces. The list of valid values for this element are presented in the table below.
If the CATEGORIES_FILTER element is omitted, no categorized messages are logged.
Valid Filternames | Description |
PROCESS | Dynamic Virtual Machine data, error, any process handled by the Genero Application Server. |
HTTP | All http requests (interaction with the User Agent). |
VM | All communications with the Dynamic Virtual Machine. |
SOCKET | Any information concerning sockets (creation, connection, communication, and so on). |
WA | Context of the Web application. |
WA | Context of the Desktop application. |
TASK | Extracts the time of all the things done by the GAS (a technical attribute). |
LOG | Display log parameters. |
GAS | Information about the Genero Application Server starting, port information, and so on. |
TIMER | Context each time a timeout expires. |
TEMPLATE | Information about templates. |
FT | Information about file transfer. |
CONFIGURATION | Log the expanded configuration of the application each time it is started. |
DEPRECATED | Log warnings if a deprecated function is used in a template. |
The following example would be valid for the CATEGORIES_FILTER element:
<CATEGORIES_FILTER>GAS PROCESS TASK</CATEGORIES_FILTER>
The optional RAW_DATA element specifies the maximum number of characters in any single log message. Log messages can include the complete html response, and can therefore be very large (an entire html page). It takes an attribute MaxLength, the number of characters after which the log message is truncated. The value provided for the MaxLength attribute must be a non-negative integer.
If the RAW_DATA element is omitted, data is logged in its entirety.
The following example would be valid for the RAW_DATA element:
<RAW_DATA MaxLength="100" />