[Yanel-dev] Debug instead of Warning

Michael Wechner michael.wechner at wyona.com
Mon Jan 31 15:53:01 CET 2011


On 1/31/11 3:09 PM, Cedric Staub wrote:
> On Fri, Jan 28, 2011 at 05:11:02PM +0000, Rob Adamson wrote:
>> On 28 January 2011 07:09, basZero<baszero at gmail.com>  wrote:
>>> Hi,
>>> another super simple patch.
>>> I would actually wish that you would go through all yanel classes and check
>>> all lines with log.warn and check whether these are really warnings for the
>>> operators running a system in production.
>> I second this :)
> Ok guys, I wrote a shell script that goes through all Java source files
> and replaces every occurence of lines like:
>
> log.warn("DEBUG: ...");
> log.error("DEBUG: ...");
>
> With the more appropriate:
>
> log.debug("...");
>
> I ran the script on the latest revision of Yanel and the result is a
> patch that you can find as an attachment to this email.

thanks very much
> For reference, here's the script (but you need zsh to run it):
> ----------
> for f in $(grep -l "log.error(\"DEBUG: " **/*.java); do
>      sed 's/log.error("DEBUG: /log.debug("/g' -i $f;
> done
> for f in $(grep -l "log.warn(\"DEBUG: " **/*.java); do
>      sed 's/log.warn("DEBUG: /log.debug("/g' -i $f;
> done
> ----------
>
> @Michael: Can we get this commited quickly? It makes the log files much
> cleaner and therefore more useful.

I understand, but one needs to review it anyway ;-)

I don't like being the bottleneck, but in order to improve
this we need to introduce and need to stick to guidelines, such
that other people can review as well. If we cannot make this
happen and guarantee QA, then it won't change and
I won't go back to the situation where we end up with unreviewed
stuff leading us into misery.

As discussed we are giving Mercurial a shot re patch management, but
this will only make it more efficient (hopefully) and it won't solve the 
problem of QA itself

I will try to do the above asap though.

Cheers

Michael
> Cheers,
> Cedric



More information about the Yanel-development mailing list