Grafne has asked for the wisdom of the Perl Monks concerning the following question:
First off I hope the title gives the correct info.
I am using Log::Dispatch to write log files but need to be able to set the name of the log file to have the hostname included.
I am currently using a conf file to configure log::dispatch::config->Log::Dispatch::Config->configure_and_watch($file).
The file looks like this dispatchers = file # need to figure out how to generate name here.. file.class = Log::Dispatch::File file.min_level = debug file.filename = log/${HOST}.log file.mode = append file.size = 102400 file.max = 10 file.close_after_write = 1 file.format = [%d] [%p] [%P:%L]%m %n
I cant figure out how to get it to set the filename using the $HOST env var.
any ideas?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: using env vars in Log::Dispatch::Config config files
by roboticus (Chancellor) on Jun 19, 2012 at 16:38 UTC | |
by Grafne (Initiate) on Jun 22, 2012 at 14:40 UTC | |
by roboticus (Chancellor) on Jun 22, 2012 at 16:00 UTC | |
|
Re: using env vars in Log::Dispatch::Config config files
by toolic (Bishop) on Jun 22, 2012 at 15:03 UTC | |
by Grafne (Initiate) on Jun 26, 2012 at 09:33 UTC |