Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix documentation.

[git-p4: depot-paths = "//src/SyslogLogger/dev/": change = 3159]
  • Loading branch information...
commit 3d7d496d6168f8aa4a8eba231058296ee3a176fc 1 parent 9fc4132
@drbrain drbrain authored
Showing with 21 additions and 7 deletions.
  1. +3 −1 History.txt
  2. +18 −6 lib/syslog_logger.rb
View
4 History.txt
@@ -1,5 +1,7 @@
-== 1.4.0 / 2007-04-21
+== 1.4.0 / 2007-05-08
* Split from rails_analyzer_tools.
* Added eh methods for compatibility with Logger.
+* Added syslog-ng instructions. Patch by Tom Lianza.
+* Fixed require in documentation. Reported by Gianni Jacklone.
View
24 lib/syslog_logger.rb
@@ -11,9 +11,9 @@
#
# NOTE! You can only set the SyslogLogger program name when you initialize
# SyslogLogger for the first time. This is a limitation of the way
-# SyslogLogger uses syslog (and in some ways, a the way syslog(3) works).
-# Attempts to change SyslogLogger's program name after the first
-# initialization will be ignored.
+# SyslogLogger uses syslog (and in some ways, a limitation of the way
+# syslog(3) works). Attempts to change SyslogLogger's program name after the
+# first initialization will be ignored.
#
# = Sample usage with Rails
#
@@ -21,7 +21,7 @@
#
# Add the following lines:
#
-# require 'production_log/syslog_logger'
+# require 'syslog_logger'
# RAILS_DEFAULT_LOGGER = SyslogLogger.new
#
# == config/environment.rb
@@ -36,7 +36,9 @@
#
# Other versions of Rails should have a similar change.
#
-# == /etc/syslog.conf
+# == BSD syslog setup
+#
+# === /etc/syslog.conf
#
# Add the following lines:
#
@@ -46,7 +48,7 @@
# Then touch /var/log/production.log and signal syslogd with a HUP
# (killall -HUP syslogd, on FreeBSD).
#
-# == /etc/newsyslog.conf
+# === /etc/newsyslog.conf
#
# Add the following line:
#
@@ -55,6 +57,16 @@
# This creates a log file that is rotated every day at midnight, gzip'd, then
# kept for 7 days. Consult newsyslog.conf(5) for more details.
#
+# == syslog-ng setup
+#
+# === syslog-ng.conf
+#
+# destination rails_log { file("/var/log/production.log"); };
+# filter f_rails { program("rails.*"); };
+# log { source(src); filter(f_rails); destination(rails_log); };
+#
+# == Starting
+#
# Now restart your Rails app. Your production logs should now be showing up
# in /var/log/production.log. If you have mulitple machines, you can log them
# all to a central machine with remote syslog logging for analysis. Consult
Please sign in to comment.
Something went wrong with that request. Please try again.