| List: | Falcon Storage Engine | « Previous MessageNext Message » | |
| From: | Olav Sandstaa | Date: | June 23 2009 1:40pm |
| Subject: | Re: Proposal: extension to Log interface to get error message written independently of falcon-debug-mask | ||
| View as plain text | |||
Hi, The only feedback on my latest proposal/patch was from Vlad where he suggested to change the name of the new debug mask from LogFatalError to LogAlwaysWrite in order to make it more general and usable in other contexts than fatal errors. I have made a new patch where I have changed this. This patch is available here: http://lists.mysql.com/commits/76920 It would be great to get an OK to push this into Falcon as it would help getting some more information written in some crashing tests that I am working on. Thanks, Olav Olav Sandstaa wrote: > Vladislav Vaintroub wrote: >> Olav Sandstaa wrote: >>> Hi, >>> >>> I have now implement this functionality. The main added >>> functionality to the Log class is: >>> >>> 1. A new debug mask called LogFatalError: >>> >>> This debug mask will be on by default for the Falcon log. It will not >>> be disabled if the user provides a debug mask at startup or changes >>> the debug mask for a running server. >>> >>> 2. A new log method Log::fatal(): >>> >>> Log messages written using this method will always be written to >>> Falcon/MySQL's log file. >>> >>> Note that compare to my original proposal this debug mask will only >>> be on for the original Falcon logger (StorageInterface::logger), >>> not for the "MySQL logger" (StorageInterface::mysqlLogger). Due to >>> this the default log mask is not completely maintained inside the >>> Log class but has to be set in when the Falcon logger is added to >>> listen to the log (in ha_falcon.cpp). >>> >>> The patch is available here: >>> >>> http://lists.mysql.com/commits/68742 >>> >>> It would be great if someone could have a look at the patch and >>> either give feedback or an OK to push it. >>> >>> Thanks, >>> Olav >> >> Olav, I think it is ok basically, but I'd prefer to maybe have it >> differently named. It could be situations where one wants to write to >> the log, even if there is no fatal error, but on some very >> interesting event. Maybe LogFatalError should be LogAlwaysWrite? > > Thanks for the suggestion, Vlad. I agree with you, there are also "non > fatal" situations where Falcon should write messages to the Log:: file > without depending on the falcon_debug_mask set by the user. > > The reason I have called it Log::fatal() and LogFatalError is that > what caused me to propose this in the first place was that I had seen > a few times where Falcon experienced situations where it could not > continue - and exited without "telling anything about why". > > But I am not sure if I think you suggestion to rename LogFatalError is > the only alternative. I see basically two other situations in addition > to "fatal situations" where Falcon always should write something to > the Log:: , serious error conditions where it is able to continue > (e.g., disk full situtations?) and places where we should provide > "info" (ie. during recovery or when we do the initials startup). So > what do you and other think about the following suggestion (the first > is the name of the "log flag" and the second is a corresponding > convenience method): > > 1. LogFatalError and Log::fatal() > 2. LogError and Log::error() > 3. LogInfo and Log::info() > > where all three "debug masks" where by default on? (note that LogInfo > is already defined and turning it on by default would increase the > "verbosity" probably too much and some of the exiting LogInfo messages > had to be changed to LogDebug). > > Vlad's suggestion would probably be implemented as: > > 1. LogAlwaysWrite and Log::logAlways() > > Opinions? > > Olav > >
