Thanks a lot..but here we are having hundreads of classes..
in this case any solution is there
thanks
Ognjen Blagojevic wrote:
>
> MY POI wrote:
>> Dear all
>>
>> I want to use the logging system in my Project which consist
>> of
>> many modules developing by the
>>
>> much developers. Here I need to replace system.out.println statements and
>> i
>> want put loggers.
>>
>> Is there any way to configuring one property file to replace the
>> statements.
>>
>> Many thanks in advance
>> Rajesh
>
> At the beginning of every class you should put:
>
> private static Logger logger = Logger.getLogger(ClassName.class);
>
> Than, instead of
>
> System.out.println("...");
>
> use
>
> logger.logMethod("...")
>
> where logMethod is info/warning/debug etc.
>
> In the end, put log4j.properties in the src.folder:
>
> ------log4j.properties------
> log4j.rootLogger=info, stdout
>
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern=%m%n
> ----------------------------
>
> That should be enough to begin working.
>
> Regards,
> Ognjen
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/HOw-to-replace-the-system.out.println-tp19232652p19269344.html
Sent from the Log4j - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]