Sivaks | 1 Aug 22:16 2011

log4j is not printing in specified path


Hi,

I am trying to log info statements using log4j. I have included log4j.xml
(refer attachment). 

static Logger logger = Logger.getLogger("Example.class");

logger.info(" Test page1");

After running the application, if i look at the specified path, I dont see
any files which i mentioned in log4j.xml.

Let me know if you need any clarification.

Any help appreciated

http://old.nabble.com/file/p32172797/log4j.xml log4j.xml 

Regards,
Siva
--

-- 
View this message in context: http://old.nabble.com/log4j-is-not-printing-in-specified-path-tp32172797p32172797.html
Sent from the Log4j - Users mailing list archive at Nabble.com.
Jacob Kjome | 1 Aug 23:31 2011

Re: log4j is not printing in specified path


Run the app with -Dlog4j.debug=true

This will make Log4j print out how it is configuring itself.  Often times it 
turns out that it's picking up some other config file than the one you assume 
it should be picking up.

Jake

On Mon, 1 Aug 2011 13:16:28 -0700 (PDT)
 Sivaks <sivakumar.subburaman <at> verizonwireless.com> wrote:
> 
> Hi,
> 
> I am trying to log info statements using log4j. I have included log4j.xml
> (refer attachment). 
> 
> static Logger logger = Logger.getLogger("Example.class");
>  
> logger.info(" Test page1");
> 
> After running the application, if i look at the specified path, I dont see
> any files which i mentioned in log4j.xml.
> 
> Let me know if you need any clarification.
> 
> Any help appreciated
> 
> http://old.nabble.com/file/p32172797/log4j.xml log4j.xml 
> 
(Continue reading)

Sivaks | 2 Aug 17:35 2011

Re: log4j is not printing in specified path


Thanks Jacob!

You are correct, it was pointing to wrong configuration path.

Regards,
Siva

Jacob Kjome wrote:
> 
> 
> Run the app with -Dlog4j.debug=true
> 
> This will make Log4j print out how it is configuring itself.  Often times
> it 
> turns out that it's picking up some other config file than the one you
> assume 
> it should be picking up.
> 
> Jake
> 
> On Mon, 1 Aug 2011 13:16:28 -0700 (PDT)
>  Sivaks <sivakumar.subburaman <at> verizonwireless.com> wrote:
>> 
>> Hi,
>> 
>> I am trying to log info statements using log4j. I have included log4j.xml
>> (refer attachment). 
>> 
>> static Logger logger = Logger.getLogger("Example.class");
(Continue reading)

DonLuigi | 3 Aug 15:33 2011
Picon

log4j under osgi not considering config setting


Hello.

I am using Karaf. Since OSGi LogService is very limited I decided to use
already bundled log4j which serves as logService backend as well.

First I configured log level for my bundle in org.ops4j.pax.logging.cfg:
log4j.logger.rts = ALL

I also turned on log4j.debug = true just to be sure that config is reloaded.

After I save config file I get following notification:

log4j: Parsing for [root] with value=[INFO, out].
log4j: Level token is [INFO].
log4j: Category root set to INFO
...
log4j: Parsing for [rts] with value=[ALL].
log4j: Level token is [DEBUG].
log4j: Category rts set to DEBUG
log4j: Handling log4j.additivity.rts=[null]
log4j: Finished configuring.

Then in my bundle I do Logger.getLogger ("rts").fine ("blah") and nothing
happens!

Using debugger shows that rts Logger has level set to INFO and not ALL.  It
seems that log4j is only considering root logger configuration.

Anybody knows what is going on?
(Continue reading)

Croacker | 5 Aug 17:19 2011
Picon

configuration options (xml files)


I m using log4J for Talend, i m using an .xml file to configure it.

my 1st appender is  : 

<appender name="R" class="org.apache.log4j.RollingFileAppender"> 

    <!-- Keep one backup file -->

    <layout class="org.apache.log4j.HTMLLayout"> 

    </layout> 
  </appender>

i would like to have a different file for each program run, it's possible?
how can i configure it?

--

-- 
View this message in context: http://old.nabble.com/configuration-options-%28xml-files%29-tp32203163p32203163.html
Sent from the Log4j - Users mailing list archive at Nabble.com.
Antonio Rodriges | 6 Aug 11:49 2011
Picon

Verification of log4j configuration file

Hello,

How to verify log4j configuration file to find out whether it is
malformed or not?
Can log4j notify me of bad file format?

Thanks
Stadelmann Josef | 8 Aug 10:09 2011
Picon

AW: Verification of log4j configuration file

Add as first line 
log4j.debug=true
to your config file and see how well your config file gets parsed
Josef

-----Ursprüngliche Nachricht-----
Von: Antonio Rodriges [mailto:antonio.rrz <at> gmail.com] 
Gesendet: Samstag, 6. August 2011 11:49
An: log4j-user <at> logging.apache.org
Betreff: Verification of log4j configuration file

Hello,

How to verify log4j configuration file to find out whether it is
malformed or not?
Can log4j notify me of bad file format?

Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe <at> logging.apache.org
For additional commands, e-mail: log4j-user-help <at> logging.apache.org
Antonio Rodriges | 8 Aug 11:04 2011
Picon

Re: Re: Verification of log4j configuration file

Thank you, Josef,

however I would like to force log4j return me an error code or throw
an exception (however docs says it never throws anything) in case of a
malformed config file to stop my application. Otherwise all logs will
cause exceptions and will not appear anywhere.
What is the best practice for an application to behave in case of
malformed log4j conf file?
SAURAV PAUL | 8 Aug 19:52 2011
Picon

Publish Article

Hi,
I am Saurav Paul,Bangalore, India working as Software Developer in software
product firm. I want to know, If I want to publish an article on Log4j under
publication section of a Apache log4j. what are the steps I need to follow?

--

-- 
Regards,
Saurav Paul
Bangalore
Curt Arnold | 9 Aug 05:32 2011
Picon

Re: Publish Article

If you are proposing an article for publication on logging.apache.org, the process would be similar to
making a code contribution. Propose the addition to log4j-dev with a detailed description of content,
language, length, etc, and see if there is any feedback and anyone who would like to help and see where that
leads you. Depending on the scope of the contribution and other issues, a contributor agreement may be
warranted (http://www.apache.org/licenses) There is a Wiki area also off of logging.apache.org which
could be used.

If you are proposing to write an article for an journal, magazine
(http://www.apache.org/foundation/marks/), et al, please adhere to our trademark policy and if you
have any questions, ask the Brand Management VP.

On Aug 8, 2011, at 12:51 PM, SAURAV PAUL wrote:

> Hi,
> I am Saurav Paul,Bangalore, India working as Software Developer in software
> product firm. I want to know, If I want to publish an article on Log4j under
> publication section of a Apache log4j. what are the steps I need to follow?
> 
> -- 
> Regards,
> Saurav Paul
> Bangalore
> 

Gmane