Permalink
Browse files

pod: mention flag file some more (its use in crontab)

  • Loading branch information...
1 parent 417158b commit 5819846347daec59e7885175c9df6a7562bd7800 Steven Haryanto (on PC) committed Jul 14, 2011
Showing with 19 additions and 0 deletions.
  1. +19 −0 lib/Log/Any/App.pm
View
19 lib/Log/Any/App.pm
@@ -1014,6 +1014,25 @@ then by default screen logging is turned off but you will be able to override
the screen log level using flag files or environment variables or command-line
options (SCREEN_DEBUG, --screen-verbose, and so on).
+=head2 Changing log level of cron scripts
+
+Environment variables and command-line options allow changing log level without
+modifying the script. But for scripts specified in crontab, they still require
+changing crontab entries, e.g.:
+
+ # turn on debugging
+ */5 * * * * DEBUG=1 foo
+
+ # be silent
+ */5 * * * * foo --quiet
+
+Another mechanism, flag file, is useful in this case. By doing:
+
+ $ echo debug > ~/foo.log_level
+ # touch /etc/foo.QUIET
+
+you can also change log levels without modifying your crontab.
+
=head2 Changing log file name/location
By default Log::Any::App will log to file to ~/$NAME.log (or /var/log/$NAME.log

0 comments on commit 5819846

Please sign in to comment.