Re: question about BootstrapLogManager
Thanks for the reply Andreas, I am working on it, I hope to have a patch for review by the end of the week. Thanks Heath On Sep 11, 2012, at 2:54 AM, Andreas Pieber wrote: > Basically I see no reason not to do this; Where exactly would you like > to handle those exceptions? Do you have an idea/patch at hand for your > idea? > > Kind regards, > Andreas > > On Thu, Sep 6, 2012 at 3:47 AM, Heath Kesler wrote: >> Hey guys, >> >> I am working on karaf-1748, and the consensus is that we should avoid >> printing stack traces on a (permission denied) FileNotFoundException on >> startup if the karaf.log is not accessible. But in order to achieve this we >> need to throw an exception from BootstrapLogManager. Currently any >> exception in that class just does a e.printStackTrace() then returns a null >> handler (which also throws a NPE). So this of course prints to the console. >> >> Is there any reason we should not throw an exception from that class and >> handle it further up in the calling classes to avoid printing to the console >> in this case (and possibly others)? I believe the DefaultJDBCLock and the >> SimpleFileLock would have to handle the exception along with a couple of >> others. >> >> Cheers, >> Heath
Re: question about BootstrapLogManager
Basically I see no reason not to do this; Where exactly would you like to handle those exceptions? Do you have an idea/patch at hand for your idea? Kind regards, Andreas On Thu, Sep 6, 2012 at 3:47 AM, Heath Kesler wrote: > Hey guys, > > I am working on karaf-1748, and the consensus is that we should avoid > printing stack traces on a (permission denied) FileNotFoundException on > startup if the karaf.log is not accessible. But in order to achieve this we > need to throw an exception from BootstrapLogManager. Currently any exception > in that class just does a e.printStackTrace() then returns a null handler > (which also throws a NPE). So this of course prints to the console. > > Is there any reason we should not throw an exception from that class and > handle it further up in the calling classes to avoid printing to the console > in this case (and possibly others)? I believe the DefaultJDBCLock and the > SimpleFileLock would have to handle the exception along with a couple of > others. > > Cheers, > Heath
question about BootstrapLogManager
Hey guys, I am working on karaf-1748, and the consensus is that we should avoid printing stack traces on a (permission denied) FileNotFoundException on startup if the karaf.log is not accessible. But in order to achieve this we need to throw an exception from BootstrapLogManager. Currently any exception in that class just does a e.printStackTrace() then returns a null handler (which also throws a NPE). So this of course prints to the console. Is there any reason we should not throw an exception from that class and handle it further up in the calling classes to avoid printing to the console in this case (and possibly others)? I believe the DefaultJDBCLock and the SimpleFileLock would have to handle the exception along with a couple of others. Cheers, Heath