From: Glenn A. H. <gh...@ek...> - 2005-02-18 16:48:58
|
Hello, I like to store my log4perl configuration in the general config file for a particular script. I use Config::IniFiles, and I put the log4perl config in a section called, appropriately, log4perl. I can then just pass the whole array right to log4perl on init. Simple enough. I was having trouble with variable evaluation, and I tracked it down to somewhere between the config file and the log4perl config parser, the lines were being placed out of order. So I created this simple hack to PropertyConfigurator.pm to delay processing of an undefined variable. It has worked so far in all my test cases. I'm not sure how 'proper' this solution is, but it seems to fit the idea of the comments I saw that mentioned the ability to read in config lines in any order. Anyway, here it is. --Glenn |