JadeHttp_Trace

The JadeHttp_Trace directive, whose characteristics are listed in the following table, controls where any mod_ jadehttp tracing is written.

Characteristic Value
Action Specifies the log file to which JADE trace messages are sent
Syntax JadeHttp_Trace bit‑mask [file‑name [size[K|M]]]
  JadeHttp_Trace bit‑mask "| rotatelogs‑program rotatelogs‑arguments"
Context Server config, virtual host, Location
Module mod_jadehttp
Examples JadeHttp_Trace 0x000000ff logs/jade%Y%m%d%H%M%S.log 10M
  JadeHttp_Trace 0x000000ff "|/usr/sbin/rotatelogs2 -l /var/logs/apache2/jadehttp_%Y%m%d%H%M.log 10M"

The JadeHttp_Trace directive is similar to the Trace, TraceFile, and [TraceFileSize] parameters in the [Jadehttp Logging] section of the jadehttp.ini file, documented earlier in this chapter.

If this parameter is not specified, logging is suppressed completely. Specifying this parameter ensures the security of your data. When the value of this parameter is specified, logged messages acknowledge only that a message has been received or sent, because it is not possible to distinguish what is sensitive data and what is not. When this parameter is specified, messages logged to the jadehttp.log file do not include any of the text sent or received from the client, as this text could contain personal information, passwords, credit card details, and so on.

You cannot use this parameter to inspect and debug data passing through the jadehttp library.

If the file‑name is relative, it is created relative to the ServerRoot location. If you do not specify the file‑name, it defaults to "logs/jadehttp%Y%m%d%H%M%S.log".

If you do not specify the size, it defaults to 5M bytes. To disable mod_ jadehttp from attempting to rotate log files, specify a size of zero (0). The size value can have a multiplier appended to it. The K multiplier multiplies by 1,024, the M multiplier multiplies by 1,048,576 bytes, and all other values are treated as bytes.

If the file-name is in a directory that an Apache child httpd process does not have permission to access, the rotation of logs is disabled in mod_ jadehttp. The file name can include % modifiers, which specify values from the current local time (based on the Apache rotatelogs2 program, whose documentation is available on the Oracle web site, for example), permitted values are AaBbcdHIjMmSUWwXxYyZ%.2.4.10

If no % modifiers are present, "%Y%m%d%H%M%S" is appended at the end of the file name (before the file extension, if it exists). This adds year, month, day, hour, minute, and second values to the file name.

A new log file is created if the file name changes (due to the changing time and selected modifier values) and if the file exceeds the specified size.

Multiple log files could be actively written to concurrently, because of the way that the Apache pre-fork MPM works.

Alternatively, you can use an external program to get log files rotated; for example, the one that is normally provided with the rotatelogs2 Apache distribution. This works well when log files are placed in a directory where the Apache child process does not have permission to create files.

The use of an external program behaves the same way as the Apache piped logs feature, which is described in the Apache documentation. It involves specifying the rotate program and arguments inside double quote characters (""), with the first character of the string being the pipe (|) character.

The name of the rotatelogs program can differ, depending on your Apache distribution and operating system.

The bit set values for the bit‑mask value are listed in the following table.

Bit Set Description
0x00000001 When a redirect occurs
0x00000002 When a special command is issued
0x00000004 When file purges occur
0x00000008 When mod_ jadehttp sends connection information to JADE