README.txt in File Log 6.2
===============================================================================
File logging
===============================================================================
A watchdog backend that logs system events directly into files.
This is an alternative to the Syslog core module, with the key difference that
this is useable on shared hosts, too.
Sections:
1.) Configuration
2.) Install, unistall, upgrade or configuration change
3.) Performance tips
4.) Maintainer
===============================================================================
Configuration
===============================================================================
The project is configurable through the $conf array under the key 'filelog' in
the site's settings.php (DRUPAL/sites/<site directory>/settings.php).
All directive is optional.
Example configuration:
$conf['filelog'] = array(
'dir' => '/var/log/drupal/example.com',
'log_level' => WATCHDOG_INFO,
'type_levels' => array(),
'buffer' => TRUE,
'site_in_name' => TRUE,
'type_in_name' => TRUE,
'severity_in_name' => TRUE,
'grouped_severity_in_name' => TRUE, //DEPRECATED
'group_severity_in_name' => TRUE,
'daily_files' => TRUE,
'delete_files' => 7,
'field_separator' => ' | ',
'field_prefix' => '[',
'field_suffix' => ']',
'wrap_message' => TRUE,
'log_base_url' => TRUE,
'log_username' => TRUE,
'date_format' => 'medium',
'decode_severity' => TRUE,
'skip_strip_tags' => TRUE,
'chmod' => FALSE,
'with_ui' => FALSE,
);
dir
Log directory. Defaults to sites/<site directory>/logs.
CAN'T CONTAIN TRAILING SLASH!
log_level
Maximum severity (inclusive) to log from WATCHDOG_EMERG(0) to
WATCHDOG_DEBUG(7). Defaults to WATCHDOG_DEBUG. This is the ganaric log level
for message types that don't have their own level configured in type_levels.
"type" is the first argument of watchdog().
type_levels
Same as log_level but on a message type basis. If a type has its own log
level, then that overrides the generic log_level.
buffer
Controls whether the entries should be written to files immediately,
or must be stored in a static buffer and be flushed in shutdown phase.
site_in_name
Add the name of the configuration directory (when TRUE) or the configured
string to the file name.
type_in_name
Add the type argument of watchdog() to the file name.
severity_in_name
Add the decoded severity to the file name.
grouped_severity_in_name //DEPRECATED
group_severity_in_name
Add one of the following parts to the file name:
debug: WATCHDOG_DEBUG;
info: WATCHDOG_INFO, WATCHDOG_NOTICE, WATCHDOG_WARNING;
error: all other levels.
Used only when severity_in_name is enabled as a subdirective of it.
daily_files
Add the current day's timestamp to the file name in the form YYYYMMDD.
delete_files
Delete log files after the configured DAYS during cron run. Used only when
daily_files is enabled.
field_separator
Text to use to separe fields in records.
field_prefix
Text to use to prefix fields in records.
field_suffix
Text to use to suffix fields in records.
wrap_message
Add the prefix and suffix to the message field, too.
log_base_url
Add the base url to the record. This is the only one formatting directive,
when 'with_ui' is enabled.
log_username
Add the username to the record instead of the UID.
date_format
Controls how to format the timestamp in the record.
Possible values are 'small', 'medium', 'large' or a custom format acceptable
by format_date() or FALSE to log the plain UNIX timestamp.
decode_severity
Add severity to the record as text not as number.
In general, severity is added to the record only, if it isn't part of
or groupped in the file name.
skip_strip_tags
Message and link fields are running through strip_tags() by default.
chmod
It can contain the permission pattern for the newly created files,
if there are file access problems out of the webserver (PHP) scope.
It does't affect existing files!
with_ui
This directive controls whether the entries are logged in a human readable
format (themed) or in an encoded format ready to use by the UI module thus
THIS DIRECTIVE MUST BE SET TO TRUE, TO LET THE UI MODULE WORK!
===============================================================================
Install, unistall, upgrade or configuration change
===============================================================================
Install
The module can be installed the same way as other drupal modules, with the
exception that configuration in settings.php must be done before install!
Uninstall
Backup of log files should be done before uninstall!
Upgrade or configuration change
To avoid inconsistent file names or file content, configuration changes should
happen as follows:
1. Disable the module
2. Backup and DELETE! log files (or change the log directory)
3. Change configuration
4. Enable the module
===============================================================================
Performance tips
===============================================================================
For the best performance:
- use custom log directory for each site or use the 'site_in_name' directive
- use a directive that results in multiple log files (like 'severity_in_name')
- disable the buffer only, if there are 'memory_limit' problems and there's no
way to increase the limit
- set the 'with_ui' directive to TRUE, but do not use the UI module on
production sites
- use logratate.d, not the built-in feature whenever possible
===============================================================================
Maintainer
===============================================================================
István Németh <i.nemeth@xmarket.hu>
http://drupal.org/user/231445
File
README.txt
View source
-
- ===============================================================================
- File logging
- ===============================================================================
- A watchdog backend that logs system events directly into files.
- This is an alternative to the Syslog core module, with the key difference that
- this is useable on shared hosts, too.
-
- Sections:
- 1.) Configuration
- 2.) Install, unistall, upgrade or configuration change
- 3.) Performance tips
- 4.) Maintainer
-
-
- ===============================================================================
- Configuration
- ===============================================================================
- The project is configurable through the $conf array under the key 'filelog' in
- the site's settings.php (DRUPAL/sites//settings.php).
-
- All directive is optional.
-
- Example configuration:
-
- $conf['filelog'] = array(
- 'dir' => '/var/log/drupal/example.com',
- 'log_level' => WATCHDOG_INFO,
- 'type_levels' => array(),
- 'buffer' => TRUE,
- 'site_in_name' => TRUE,
- 'type_in_name' => TRUE,
- 'severity_in_name' => TRUE,
- 'grouped_severity_in_name' => TRUE, //DEPRECATED
- 'group_severity_in_name' => TRUE,
- 'daily_files' => TRUE,
- 'delete_files' => 7,
- 'field_separator' => ' | ',
- 'field_prefix' => '[',
- 'field_suffix' => ']',
- 'wrap_message' => TRUE,
- 'log_base_url' => TRUE,
- 'log_username' => TRUE,
- 'date_format' => 'medium',
- 'decode_severity' => TRUE,
- 'skip_strip_tags' => TRUE,
- 'chmod' => FALSE,
- 'with_ui' => FALSE,
- );
-
- dir
- Log directory. Defaults to sites//logs.
- CAN'T CONTAIN TRAILING SLASH!
-
- log_level
- Maximum severity (inclusive) to log from WATCHDOG_EMERG(0) to
- WATCHDOG_DEBUG(7). Defaults to WATCHDOG_DEBUG. This is the ganaric log level
- for message types that don't have their own level configured in type_levels.
- "type" is the first argument of watchdog().
-
- type_levels
- Same as log_level but on a message type basis. If a type has its own log
- level, then that overrides the generic log_level.
-
- buffer
- Controls whether the entries should be written to files immediately,
- or must be stored in a static buffer and be flushed in shutdown phase.
-
- site_in_name
- Add the name of the configuration directory (when TRUE) or the configured
- string to the file name.
-
- type_in_name
- Add the type argument of watchdog() to the file name.
-
- severity_in_name
- Add the decoded severity to the file name.
-
- grouped_severity_in_name //DEPRECATED
- group_severity_in_name
- Add one of the following parts to the file name:
- debug: WATCHDOG_DEBUG;
- info: WATCHDOG_INFO, WATCHDOG_NOTICE, WATCHDOG_WARNING;
- error: all other levels.
- Used only when severity_in_name is enabled as a subdirective of it.
-
- daily_files
- Add the current day's timestamp to the file name in the form YYYYMMDD.
-
- delete_files
- Delete log files after the configured DAYS during cron run. Used only when
- daily_files is enabled.
-
- field_separator
- Text to use to separe fields in records.
-
- field_prefix
- Text to use to prefix fields in records.
-
- field_suffix
- Text to use to suffix fields in records.
-
- wrap_message
- Add the prefix and suffix to the message field, too.
-
- log_base_url
- Add the base url to the record. This is the only one formatting directive,
- when 'with_ui' is enabled.
-
- log_username
- Add the username to the record instead of the UID.
-
- date_format
- Controls how to format the timestamp in the record.
- Possible values are 'small', 'medium', 'large' or a custom format acceptable
- by format_date() or FALSE to log the plain UNIX timestamp.
-
- decode_severity
- Add severity to the record as text not as number.
- In general, severity is added to the record only, if it isn't part of
- or groupped in the file name.
-
- skip_strip_tags
- Message and link fields are running through strip_tags() by default.
-
- chmod
- It can contain the permission pattern for the newly created files,
- if there are file access problems out of the webserver (PHP) scope.
- It does't affect existing files!
-
- with_ui
- This directive controls whether the entries are logged in a human readable
- format (themed) or in an encoded format ready to use by the UI module thus
- THIS DIRECTIVE MUST BE SET TO TRUE, TO LET THE UI MODULE WORK!
-
-
- ===============================================================================
- Install, unistall, upgrade or configuration change
- ===============================================================================
- Install
- The module can be installed the same way as other drupal modules, with the
- exception that configuration in settings.php must be done before install!
-
- Uninstall
- Backup of log files should be done before uninstall!
-
- Upgrade or configuration change
- To avoid inconsistent file names or file content, configuration changes should
- happen as follows:
- 1. Disable the module
- 2. Backup and DELETE! log files (or change the log directory)
- 3. Change configuration
- 4. Enable the module
-
-
- ===============================================================================
- Performance tips
- ===============================================================================
- For the best performance:
- - use custom log directory for each site or use the 'site_in_name' directive
- - use a directive that results in multiple log files (like 'severity_in_name')
- - disable the buffer only, if there are 'memory_limit' problems and there's no
- way to increase the limit
- - set the 'with_ui' directive to TRUE, but do not use the UI module on
- production sites
- - use logratate.d, not the built-in feature whenever possible
-
-
- ===============================================================================
- Maintainer
- ===============================================================================
- István Németh
- http://drupal.org/user/231445