You are here

README.txt in File Log 6

Same filename and directory in other branches
  1. 6.2 README.txt
  2. 7 README.txt
===============================================================================
File logging
===============================================================================
A watchdog interface implementation which records system events directly into
files. This is an alternative to the Syslog core module.


===============================================================================
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,
  'site_in_name' => TRUE,
  'type_in_name' => TRUE,
  'severity_in_name' => TRUE,
  'grouped_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,
);

Logging directives:
-------------------
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.

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
  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 NOT severity_in_name.

daily_files
  Add the 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.

Theming directives:
-------------------
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.

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().

decode_severity
  Add severity to the record as text not as number.

skip_strip_tags
  Message and link fields are running through strip_tags() by default.


===============================================================================
Install, unistall
===============================================================================
Configuration must be done before install!

Backup should be done before uninstall!


===============================================================================
Maintainer
===============================================================================
István Németh <i.nemeth@xmarket.hu>
              http://drupal.org/user/231445

File

README.txt
View source
  1. ===============================================================================
  2. File logging
  3. ===============================================================================
  4. A watchdog interface implementation which records system events directly into
  5. files. This is an alternative to the Syslog core module.
  6. ===============================================================================
  7. Configuration
  8. ===============================================================================
  9. The project is configurable through the $conf array under the key 'filelog' in
  10. the site's settings.php (DRUPAL/sites//settings.php).
  11. All directive is optional.
  12. Example configuration:
  13. $conf['filelog'] = array(
  14. 'dir' => '/var/log/drupal/example.com',
  15. 'log_level' => WATCHDOG_INFO,
  16. 'site_in_name' => TRUE,
  17. 'type_in_name' => TRUE,
  18. 'severity_in_name' => TRUE,
  19. 'grouped_severity_in_name' => TRUE,
  20. 'daily_files' => TRUE,
  21. 'delete_files' => 7,
  22. 'field_separator' => ' | ',
  23. 'field_prefix' => '[',
  24. 'field_suffix' => ']',
  25. 'wrap_message' => TRUE,
  26. 'log_base_url' => TRUE,
  27. 'log_username' => TRUE,
  28. 'date_format' => 'medium',
  29. 'decode_severity' => TRUE,
  30. 'skip_strip_tags' => TRUE,
  31. );
  32. Logging directives:
  33. -------------------
  34. dir
  35. Log directory. Defaults to sites//logs.
  36. CAN'T CONTAIN TRAILING SLASH!
  37. log_level
  38. Maximum severity (inclusive) to log from WATCHDOG_EMERG(0) to
  39. WATCHDOG_DEBUG(7). Defaults to WATCHDOG_DEBUG.
  40. site_in_name
  41. Add the name of the configuration directory (when TRUE) or the configured
  42. string to the file name.
  43. type_in_name
  44. Add the $type argument of watchdog() to the file name.
  45. severity_in_name
  46. Add the decoded severity to the file name.
  47. grouped_severity_in_name
  48. Add one of the following parts to the file name:
  49. debug: WATCHDOG_DEBUG;
  50. info: WATCHDOG_INFO, WATCHDOG_NOTICE, WATCHDOG_WARNING;
  51. error: all other levels.
  52. Used only when NOT severity_in_name.
  53. daily_files
  54. Add the the current day's timestamp to the file name in the form YYYYMMDD.
  55. delete_files
  56. Delete log files after the configured DAYS during cron run. Used only when
  57. daily_files is enabled.
  58. Theming directives:
  59. -------------------
  60. field_separator
  61. Text to use to separe fields in records.
  62. field_prefix
  63. Text to use to prefix fields in records.
  64. field_suffix
  65. Text to use to suffix fields in records.
  66. wrap_message
  67. Add the prefix and suffix to the message field, too.
  68. log_base_url
  69. Add the base url to the record.
  70. log_username
  71. Add the username to the record instead of the UID.
  72. date_format
  73. Controls how to format the timestamp in the record.
  74. Possible values are 'small', 'medium', 'large' or a custom format acceptable
  75. by format_date().
  76. decode_severity
  77. Add severity to the record as text not as number.
  78. skip_strip_tags
  79. Message and link fields are running through strip_tags() by default.
  80. ===============================================================================
  81. Install, unistall
  82. ===============================================================================
  83. Configuration must be done before install!
  84. Backup should be done before uninstall!
  85. ===============================================================================
  86. Maintainer
  87. ===============================================================================
  88. István Németh
  89. http://drupal.org/user/231445