You are here

README.txt in File Log 7

Same filename and directory in other branches
  1. 6.2 README.txt
  2. 6 README.txt
// $Id$

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