Login | Register
My pages Projects Community openCollabNet

Discussions > users > RE: [gef-users] System.out

gef
Discussion topic

Back to topic list

RE: [gef-users] System.out

Reply

Author Bob dot Tarling at irishlife dot ie
Full name Bob dot Tarling at irishlife dot ie
Date 2003-07-15 08:42:01 PDT
Message Too simplistic I think for the long term but may be a way of quickly getting
rid of the System.outs in the short term and satisfying your requirements.

Longer term I'd rather we used more standard log4j style.

If we don't want to be tied to log4j then the commons logger might be worth
looking at.


> -----Original Message-----
> From: Ilja Preuss [SMTP:preuss at disy dot net]
> Sent: 15 July 2003 15:18
> To: users at gef dot tigris dot org
> Subject: RE: [gef-users] System.out
>
> Bob dot Tarling at irishlife dot ie wrote:
> > To refactor
> > System.out.println(???)
> >
> > to
> > if (cat.isDebugEnabled()) cat.debug(???)
> >
> > (together with the declaration of the cat logger)
> >
> > seems like it must be a fairly common task. I wonder if there
> > are any tools out there to do this for us? I'll have a look and
> > report back.
>
> If we wanted to go very simplistic, we could define an interface
>
> interface Logger {
> void log(String message);
> }
>
> And replace
>
> System.out.println("...");
>
> By
>
> Logging.getLogger().log("...");
>
> A simle regex-replace tool should work.
>
> It would be the responsibility of the Logger implementation to decide
> wether to print the message to System.out, delegate to a more
> sophisticated logging framework or just ignore it.
>
> Regards, Ilja
>
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: users-unsubscribe@ge​f.tigris.org
> For additional commands, e-mail: users-help at gef dot tigris dot org


This is a confidential communication and is intended only for the addressee
indicated in the message (or duly authorised to be responsible for the
delivery of the message to such person). You are specifically prohibited
from copying this message or delivering the same, or any part thereof, to
any other person, whomsoever or howsoever, unless you receive written
authorisation from us to do. If you are anyone other than the intended
addressee, or person duly authorised and responsible for the delivery of
this message to the intended addressee, you should destroy this message and notify us immediately. Please note that we accept no responsibility
whatsoever in the event that this message or any other email message or any part thereof becomes known or is communicated to anyone other than the intended recipient or other person authorised in writing by us to receive
it, howsoever arising and disclaim all liability for any losses or damage
which may be sustained by any person as a result thereof.

Irish Life Assurance plc (trading as Irish Life) is regulated by the Irish Finanical Services Regulatory Authority.


--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: users-unsubscribe@ge​f.tigris.org
For additional commands, e-mail: users-help at gef dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

RE: [gef-users] System.out Bob dot Tarling at irishlife dot ie Bob dot Tarling at irishlife dot ie 2003-07-15 08:42:01 PDT
Messages per page: