From: <lei...@hp...> - 2003-05-13 01:17:46
|
I am not sure if this has been raised before, the sourceforge mail list browse doesn't have a search function, so I just checked the last 100 messages. I suppose I would call this more an issue of style - I have issues with any library that exits on me. I would prefer a library told me 'sorry I cant help you' and let me decide on the flow from there. This arose because I sometimes execute .t files from within the t directory (especialy if I am writing a .t file in an editor - I use xemacs and run mode-compile on the .t file) - to get around the fact that the Log4perl config file is one directory up I usually provide a symlink to it inside the t directory. An eval could help - in fact there are many 'workarounds' - but I still feel calling die is wrong. Are there any plans for this behaviour to be revised in the future ?? Leif Eriksen Developer HPA - IT Development +61 3 9217 5545 lei...@hp... ********************************************************************** IMPORTANT The contents of this e-mail and its attachments are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you received this e-mail in error, please notify the HPA Postmaster, pos...@hp..., then delete the e-mail. This footnote also confirms that this e-mail message has been swept for the presence of computer viruses by MimeSweeper. Before opening or using any attachments, check them for viruses and defects. Our liability is limited to resupplying any affected attachments. HPA collects personal information to provide and market our services. For more information about use, disclosure and access see our Privacy Policy at www.hpa.com.au ********************************************************************** |
From: Mike S. <log...@pe...> - 2003-05-13 01:53:17
|
On Tue, 13 May 2003 lei...@hp... wrote: > I am not sure if this has been raised before, the sourceforge mail list > browse doesn't have a search function, so I just checked the last 100 > messages. Look at the upper left corner. There's a search field and a select box with the item "This Mailing List": http://sourceforge.net/mailarchive/forum.php?forum_id=10175 > I suppose I would call this more an issue of style - I have issues with any > library that exits on me. I would prefer a library told me 'sorry I cant > help you' and let me decide on the flow from there. > ... > An eval could help - in fact there are many 'workarounds' - but I still feel > calling die is wrong. > > Are there any plans for this behaviour to be revised in the future ?? It's a trade-off to protect against people not checking the return code of init() and then wondering what's wrong. A matter of style, indeed, and negotiable. One area which is tougher to solve is with init_and_watch(). What happens if Log4perl reloads the conf file and somebody has put a syntax error in there? There's no application interaction at this point, no way to catch this error but die. I think this particular issue also drove the decision to die() on a failed init(). -- Mike Mike Schilli log...@pe... http://perlmeister.com http://log4perl.sourceforge.net |
From: Wiggins d'A. <wi...@da...> - 2003-05-21 00:58:41
|
Mike Schilli wrote: > On Tue, 13 May 2003 lei...@hp... wrote: > > >>I am not sure if this has been raised before, the sourceforge mail list >>browse doesn't have a search function, so I just checked the last 100 >>messages. > > > Look at the upper left corner. There's a search field and a select box with > the item "This Mailing List": > > http://sourceforge.net/mailarchive/forum.php?forum_id=10175 > > >>I suppose I would call this more an issue of style - I have issues with any >>library that exits on me. I would prefer a library told me 'sorry I cant >>help you' and let me decide on the flow from there. >>... >>An eval could help - in fact there are many 'workarounds' - but I still feel >>calling die is wrong. >> >>Are there any plans for this behaviour to be revised in the future ?? > > > It's a trade-off to protect against people not checking the return code of > init() and then wondering what's wrong. A matter of style, indeed, and > negotiable. > > One area which is tougher to solve is with init_and_watch(). What happens > if Log4perl reloads the conf file and somebody has put a syntax error > in there? There's no application interaction at this point, no way to > catch this error but die. I think this particular issue also drove the > decision to die() on a failed init(). I had wondered about this last part (init_and_watch) while trying to bullet proof our app. Would it be possible to do something along the lines of: 1) Store old configuration 2) Read new configuration a) succeeds replaces old configuration (like current) b) fails: calls handler, resumes with original configuration Then the author would supply 'init_and_watch' with a handler (code ref) that would be called if the new configuration couldn't be loaded. Seems like this is an easy way to alert the user, keep the app running, and still be able to log (albeit under the original configuration). Don't recall if init_and_watch is configurable from a file, that could conceivably cause some problems (aka putting a bad handler in the config file, etc.).... The die I don't mind on the 'init' since it can be caught and that seems to be a direction a number of modules are moving in, but the init_and_watch is an interesting issue. http://danconia.org |