Re: Is there a way to reference and env. variable from log4j.xml?

2007-01-15 Thread James Stauffer

Can you change the command line? You could add "-Dlog_root=%log_root%"
to copy it to a system property, which should be accessible.

On 1/15/07, Reshat Sabiq <[EMAIL PROTECTED]> wrote:

I'd like to do smt. like:
%LOG_ROOT%/myLog.log


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
James Staufferhttp://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: log4j.properties

2007-01-15 Thread James Stauffer

It basically overlaps.

On 1/15/07, Reshat Sabiq <[EMAIL PROTECTED]> wrote:

James Stauffer  gmail.com> writes:

>
> Yes, log4j is only configured once.  If you want each jar to have
> isn't own config then you need to look into repository selectors.
What happens when the code calls:
PropertyConfigurator.configure(log4jPropertiesFileURL);
after auto-configuration?
Does this overwrite all auto-config settings, or only overlapping ones?

Thanks.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
James Staufferhttp://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Is there a way to reference and env. variable from log4j.xml?

2007-01-15 Thread Reshat Sabiq
I'd like to do smt. like:
%LOG_ROOT%/myLog.log


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: log4j.properties

2007-01-15 Thread Reshat Sabiq
James Stauffer  gmail.com> writes:

> 
> Yes, log4j is only configured once.  If you want each jar to have
> isn't own config then you need to look into repository selectors.
What happens when the code calls:
PropertyConfigurator.configure(log4jPropertiesFileURL);
after auto-configuration?
Does this overwrite all auto-config settings, or only overlapping ones?

Thanks.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cannot write to a file with rollingfileappender in log4j1.3

2007-01-15 Thread Jacob Kjome
Quoting dirk ooms <[EMAIL PROTECTED]>:

> On Monday 15 January 2007 19:04, Jacob Kjome wrote:
> > The file should look something like this...
> >
> > 
> > http://logging.apache.org/log4j/";
> > debug="false" threshold="debug">
>
> AFAIK the  tag was used in version 1.2.x, but it is
> inproper xml. In 1.3 this was corrected (or at least an attempt was made) to
> . So it might be that the deprecated DOMConfigurator is still
> expecting  ..., but if one relies on the default
> initialization, the tag  is expected in version 1.3.
>

Exactly.  The deprecated DOMConfigurator still uses the old syntax.  I don't
recall whether the JoranConfigurator can deal with the old syntax or not?  It's
been a while since I tested that (I think maybe it doesn't).  In any case, it
should, just to be backward compatible.  Or, at least, JoranConfigurator should
recognize the old syntax and defer to DOMConfigurator in that case.  Of course
there's other compatibility gotcha's between 1.2 and 1.3.


Jake

> dirk
>
> >
> > 
> > 
> > 
> >
> > 
> >
> >
> > Jake
> >
> > Quoting Surya Poola <[EMAIL PROTECTED]>:
> > > Hi,
> > >   Iam getting the following warnings if  iam using DOM Configurator and
> > > iam not getting the log file created:
> > >
> > >   log4j:WARN Continuable parsing error 2 and column 16
> > > log4j:WARN Document root element "configuration", must match DOCTYPE root
> > > "null".
> > > log4j:WARN Continuable parsing error 2 and column 16
> > > log4j:WARN Document is invalid: no grammar found.
> > > log4j:WARN The  element has been deprecated.
> > > log4j:WARN Use the  element instead.
> > >
> > > I hope DOM configurator doesnot support the xml generated for log4j1.3
> > > from (http://wizardforge.org/pc?action=show), like
> > >
> > >   
> > >   
> > >> > name="MyFileAppender">
> > >   
> > >   
> > >>
> > value="/pkg/vdcu0/home/bischru0/AladinArchiveViewer.d/AladinArchiveViewer.%
> >d{-MM}.gz"/>
> >
> > >   
> > >   
> > >   
> > >   
> > >   
> > >   
> > >   
> > >   
> > >   
> > >   
> > >
> > >   I have tried changing the xml as per log4j1.2.x version ,but then also
> > > i am getting the same error.so can anyone suggest me the proper usage of
> > > rollingfielappender in log4j1.3 version.
> > >
> > >   Thanks in advance
> > >
> > >   Regards
> > >   Rohan
> > >
> > > James Stauffer <[EMAIL PROTECTED]> wrote:
> > >   Even though DOMConfigurator is depreciated it may still work and it
> > > may be worthwhile to try it to see if your config is ok.
> > >
> > > On 1/15/07, Surya Poola wrote:
> > > > Dirk,
> > > >
> > > > Thanks for your help,but iam sorry to query you once more:
> > > >
> > > > I already have gone through the document.My question is in log4j 1.2.8
> > > > i
> > >
> > > was using the following for DailyRollingFileAppender to map to
> > > configuration
> > >
> > > file :
> > > > DOMConfigurator.configure(mLOG4JCONFIGFILE);
> > > > where mLOG4JCONFIGFILE was the property where i mentioned the location
> > > > of
> > >
> > > xml file.
> > >
> > > > But in 1.3 alpha-8,DOMConfigurator is depracated.
> > > >
> > > > So iam forced to use joranconfigurator, by which iam not able to write
> > > > to
> > >
> > > file,ie, file is not created.I am mentioning my program as follows:
> > > > JoranConfigurator jc = new JoranConfigurator();
> > > > jc.doConfigure(mLOG4JCONFIGFILE, LogManager.getLoggerRepository());
> > > >
> > > > So can you let me kow how to configure with joranconfigurator or any
> > > > other
> > >
> > > configurator.
> > >
> > > > Thanks in advance
> > > >
> > > > Regards
> > > > Rohan
> > > >
> > > > Dirk Ooms wrote:
> > > > Rohan,
> > > >
> > > > have a look at the 'Default Initalization Procedure' at
> > >
> > > http://logging.apache.org/log4j/docs/manual.html
> > >
> > > > it explains how log4j will find your config file.
> > > >
> > > > dirk
> > > >
> > > > -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > > >
> > > > -
> > > > No need to miss a message. Get email on-the-go
> > > > with Yahoo! Mail for Mobile. Get started.
> > >
> > > --
> > > James Stauffer http://www.geocities.com/stauffer_james/
> > > Are you good? Take the test at http://www.livingwaters.com/good/
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> > > -
> > > The fish are biting.
> > >  Get more visitors on your site using Yahoo! Search Marketing.
> > >
> > > -
> > > Be a PS3 game guru.
> > > Get your game face on with the latest PS3 news and previews at Yahoo!
> > > Games.
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTEC

Re: cannot write to a file with rollingfileappender in log4j1.3

2007-01-15 Thread dirk ooms
On Monday 15 January 2007 19:04, Jacob Kjome wrote:
> The file should look something like this...
>
> 
> http://logging.apache.org/log4j/";
> debug="false" threshold="debug">

AFAIK the  tag was used in version 1.2.x, but it is 
inproper xml. In 1.3 this was corrected (or at least an attempt was made) to 
. So it might be that the deprecated DOMConfigurator is still 
expecting  ..., but if one relies on the default 
initialization, the tag  is expected in version 1.3.

dirk

>
> 
> 
> 
>
> 
>
>
> Jake
>
> Quoting Surya Poola <[EMAIL PROTECTED]>:
> > Hi,
> >   Iam getting the following warnings if  iam using DOM Configurator and
> > iam not getting the log file created:
> >
> >   log4j:WARN Continuable parsing error 2 and column 16
> > log4j:WARN Document root element "configuration", must match DOCTYPE root
> > "null".
> > log4j:WARN Continuable parsing error 2 and column 16
> > log4j:WARN Document is invalid: no grammar found.
> > log4j:WARN The  element has been deprecated.
> > log4j:WARN Use the  element instead.
> >
> > I hope DOM configurator doesnot support the xml generated for log4j1.3
> > from (http://wizardforge.org/pc?action=show), like
> >
> >   
> >   
> >> name="MyFileAppender">
> >   
> >   
> >   
> value="/pkg/vdcu0/home/bischru0/AladinArchiveViewer.d/AladinArchiveViewer.%
>d{-MM}.gz"/>
>
> >   
> >   
> >   
> >   
> >   
> >   
> >   
> >   
> >   
> >   
> >
> >   I have tried changing the xml as per log4j1.2.x version ,but then also
> > i am getting the same error.so can anyone suggest me the proper usage of
> > rollingfielappender in log4j1.3 version.
> >
> >   Thanks in advance
> >
> >   Regards
> >   Rohan
> >
> > James Stauffer <[EMAIL PROTECTED]> wrote:
> >   Even though DOMConfigurator is depreciated it may still work and it
> > may be worthwhile to try it to see if your config is ok.
> >
> > On 1/15/07, Surya Poola wrote:
> > > Dirk,
> > >
> > > Thanks for your help,but iam sorry to query you once more:
> > >
> > > I already have gone through the document.My question is in log4j 1.2.8
> > > i
> >
> > was using the following for DailyRollingFileAppender to map to
> > configuration
> >
> > file :
> > > DOMConfigurator.configure(mLOG4JCONFIGFILE);
> > > where mLOG4JCONFIGFILE was the property where i mentioned the location
> > > of
> >
> > xml file.
> >
> > > But in 1.3 alpha-8,DOMConfigurator is depracated.
> > >
> > > So iam forced to use joranconfigurator, by which iam not able to write
> > > to
> >
> > file,ie, file is not created.I am mentioning my program as follows:
> > > JoranConfigurator jc = new JoranConfigurator();
> > > jc.doConfigure(mLOG4JCONFIGFILE, LogManager.getLoggerRepository());
> > >
> > > So can you let me kow how to configure with joranconfigurator or any
> > > other
> >
> > configurator.
> >
> > > Thanks in advance
> > >
> > > Regards
> > > Rohan
> > >
> > > Dirk Ooms wrote:
> > > Rohan,
> > >
> > > have a look at the 'Default Initalization Procedure' at
> >
> > http://logging.apache.org/log4j/docs/manual.html
> >
> > > it explains how log4j will find your config file.
> > >
> > > dirk
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> > > -
> > > No need to miss a message. Get email on-the-go
> > > with Yahoo! Mail for Mobile. Get started.
> >
> > --
> > James Stauffer http://www.geocities.com/stauffer_james/
> > Are you good? Take the test at http://www.livingwaters.com/good/
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> > -
> > The fish are biting.
> >  Get more visitors on your site using Yahoo! Search Marketing.
> >
> > -
> > Be a PS3 game guru.
> > Get your game face on with the latest PS3 news and previews at Yahoo!
> > Games.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cannot write to a file with rollingfileappender in log4j1.3

2007-01-15 Thread dirk ooms

>   I already have gone through the document.My question is in log4j 1.2.8 i
> was using the following for DailyRollingFileAppender to map to
> configuration file : DOMConfigurator.configure(mLOG4JCONFIGFILE);
> where mLOG4JCONFIGFILE was the property where i mentioned the location of
> xml file.

There is really no need to use either the DOMConfigurator or the 
JoranConfigurator if you use a static configuration. So just leave it out and 
either put the log4j.xml in your classpath or specify the log4j.configuration 
system property.

dirk 

>
>   But in 1.3 alpha-8,DOMConfigurator is depracated.
>
>   So iam forced to use joranconfigurator,  by which iam not able to write
> to file,ie, file is not created.I am mentioning my program as follows:
> JoranConfigurator jc = new JoranConfigurator();
> jc.doConfigure(mLOG4JCONFIGFILE, LogManager.getLoggerRepository());
>
>   So can you let me kow how to configure with joranconfigurator or any
> other configurator.
>
>   Thanks in advance
>
>   Regards
>   Rohan
>
> Dirk Ooms <[EMAIL PROTECTED]> wrote:
>   Rohan,
>
> have a look at the 'Default Initalization Procedure' at
> http://logging.apache.org/log4j/docs/manual.html it explains how log4j will
> find your config file.
>
> dirk
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> -
> No need to miss a message. Get email on-the-go
> with Yahoo! Mail for Mobile. Get started.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cannot write to a file with rollingfileappender in log4j1.3

2007-01-15 Thread Jacob Kjome

The file should look something like this...


http://logging.apache.org/log4j/";
debug="false" threshold="debug">








Jake

Quoting Surya Poola <[EMAIL PROTECTED]>:

> Hi,
>   Iam getting the following warnings if  iam using DOM Configurator and iam
> not getting the log file created:
>
>   log4j:WARN Continuable parsing error 2 and column 16
> log4j:WARN Document root element "configuration", must match DOCTYPE root
> "null".
> log4j:WARN Continuable parsing error 2 and column 16
> log4j:WARN Document is invalid: no grammar found.
> log4j:WARN The  element has been deprecated.
> log4j:WARN Use the  element instead.
>
> I hope DOM configurator doesnot support the xml generated for log4j1.3 from
> (http://wizardforge.org/pc?action=show), like
>
>   
>   
>name="MyFileAppender">
>   
>   
>   
value="/pkg/vdcu0/home/bischru0/AladinArchiveViewer.d/AladinArchiveViewer.%d{-MM}.gz"/>
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>
>   I have tried changing the xml as per log4j1.2.x version ,but then also i am
> getting the same error.so can anyone suggest me the proper usage of
> rollingfielappender in log4j1.3 version.
>
>   Thanks in advance
>
>   Regards
>   Rohan
>
> James Stauffer <[EMAIL PROTECTED]> wrote:
>   Even though DOMConfigurator is depreciated it may still work and it
> may be worthwhile to try it to see if your config is ok.
>
> On 1/15/07, Surya Poola wrote:
> > Dirk,
> >
> > Thanks for your help,but iam sorry to query you once more:
> >
> > I already have gone through the document.My question is in log4j 1.2.8 i
> was using the following for DailyRollingFileAppender to map to configuration
> file :
> > DOMConfigurator.configure(mLOG4JCONFIGFILE);
> > where mLOG4JCONFIGFILE was the property where i mentioned the location of
> xml file.
> >
> > But in 1.3 alpha-8,DOMConfigurator is depracated.
> >
> > So iam forced to use joranconfigurator, by which iam not able to write to
> file,ie, file is not created.I am mentioning my program as follows:
> > JoranConfigurator jc = new JoranConfigurator();
> > jc.doConfigure(mLOG4JCONFIGFILE, LogManager.getLoggerRepository());
> >
> > So can you let me kow how to configure with joranconfigurator or any other
> configurator.
> >
> > Thanks in advance
> >
> > Regards
> > Rohan
> >
> > Dirk Ooms wrote:
> > Rohan,
> >
> > have a look at the 'Default Initalization Procedure' at
> http://logging.apache.org/log4j/docs/manual.html
> > it explains how log4j will find your config file.
> >
> > dirk
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> > -
> > No need to miss a message. Get email on-the-go
> > with Yahoo! Mail for Mobile. Get started.
> >
>
>
> --
> James Stauffer http://www.geocities.com/stauffer_james/
> Are you good? Take the test at http://www.livingwaters.com/good/
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> -
> The fish are biting.
>  Get more visitors on your site using Yahoo! Search Marketing.
>
> -
> Be a PS3 game guru.
> Get your game face on with the latest PS3 news and previews at Yahoo! Games.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cannot write to a file with rollingfileappender in log4j1.3

2007-01-15 Thread Surya Poola
Hi,
  Iam getting the following warnings if  iam using DOM Configurator and iam not 
getting the log file created:
   
  log4j:WARN Continuable parsing error 2 and column 16
log4j:WARN Document root element "configuration", must match DOCTYPE root 
"null".
log4j:WARN Continuable parsing error 2 and column 16
log4j:WARN Document is invalid: no grammar found.
log4j:WARN The  element has been deprecated.
log4j:WARN Use the  element instead.

I hope DOM configurator doesnot support the xml generated for log4j1.3 from 
(http://wizardforge.org/pc?action=show), like
   
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
   
  I have tried changing the xml as per log4j1.2.x version ,but then also i am 
getting the same error.so can anyone suggest me the proper usage of 
rollingfielappender in log4j1.3 version.
   
  Thanks in advance
   
  Regards
  Rohan
  
James Stauffer <[EMAIL PROTECTED]> wrote:
  Even though DOMConfigurator is depreciated it may still work and it
may be worthwhile to try it to see if your config is ok.

On 1/15/07, Surya Poola wrote:
> Dirk,
>
> Thanks for your help,but iam sorry to query you once more:
>
> I already have gone through the document.My question is in log4j 1.2.8 i was 
> using the following for DailyRollingFileAppender to map to configuration file 
> :
> DOMConfigurator.configure(mLOG4JCONFIGFILE);
> where mLOG4JCONFIGFILE was the property where i mentioned the location of xml 
> file.
>
> But in 1.3 alpha-8,DOMConfigurator is depracated.
>
> So iam forced to use joranconfigurator, by which iam not able to write to 
> file,ie, file is not created.I am mentioning my program as follows:
> JoranConfigurator jc = new JoranConfigurator();
> jc.doConfigure(mLOG4JCONFIGFILE, LogManager.getLoggerRepository());
>
> So can you let me kow how to configure with joranconfigurator or any other 
> configurator.
>
> Thanks in advance
>
> Regards
> Rohan
>
> Dirk Ooms wrote:
> Rohan,
>
> have a look at the 'Default Initalization Procedure' at 
> http://logging.apache.org/log4j/docs/manual.html
> it explains how log4j will find your config file.
>
> dirk
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> -
> No need to miss a message. Get email on-the-go
> with Yahoo! Mail for Mobile. Get started.
>


-- 
James Stauffer http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 
-
The fish are biting.
 Get more visitors on your site using Yahoo! Search Marketing.
 
-
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.

Re: cannot write to a file with rollingfileappender in log4j1.3

2007-01-15 Thread James Stauffer

Even though DOMConfigurator is depreciated it may still work and it
may be worthwhile to try it to see if your config is ok.

On 1/15/07, Surya Poola <[EMAIL PROTECTED]> wrote:

Dirk,

  Thanks for your help,but iam sorry to query you once more:

  I already have gone through the document.My question is in log4j 1.2.8 i was 
using the following for DailyRollingFileAppender to map to configuration file :
  DOMConfigurator.configure(mLOG4JCONFIGFILE);
where mLOG4JCONFIGFILE was the property where i mentioned the location of xml 
file.

  But in 1.3 alpha-8,DOMConfigurator is depracated.

  So iam forced to use joranconfigurator,  by which iam not able to write to 
file,ie, file is not created.I am mentioning my program as follows:
  JoranConfigurator jc = new JoranConfigurator();
jc.doConfigure(mLOG4JCONFIGFILE, LogManager.getLoggerRepository());

  So can you let me kow how to configure with joranconfigurator or any other 
configurator.

  Thanks in advance

  Regards
  Rohan

Dirk Ooms <[EMAIL PROTECTED]> wrote:
  Rohan,

have a look at the 'Default Initalization Procedure' at 
http://logging.apache.org/log4j/docs/manual.html
it explains how log4j will find your config file.

dirk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started.




--
James Staufferhttp://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Logging stops after hours working

2007-01-15 Thread Cristian Jansenson
I am running an application that uses log4j version 1.2.9.  The application
is running on Java 1.5.0.9 for Linux 64-bit version.  After minutes or hours
of running and logging, log4j stops logging.  The console shows the
following message, which partially explains the reason:

 

log4j: Hierarchy threshold set to [OFF].

log4j: Could not find root logger information. Is this OK?

log4j: Finished configuring.

 

But why does this happen?  Since this information is printed from the
PropertyConfigurator, It looks as if log4j were re-configuring, even though
I am NOT using the configureAndWatch method, and the log4j.properties file
was neither touched nor changed.  

 

My log4j.properties:

 

# enable log4j debugging, and set threshold=ALL (see bug 10598)

log4j.threshold=ALL

log4j.debug=true

 

# Set root logger level to DEBUG and its only appender to A1.

log4j.rootLogger=ERROR, A1

log4j.logger.http=WARN, HTTP

 

# see bug 10603:  http should not inherit appenders, etc, from root.

log4j.additivity.http=false

 

log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender

log4j.appender.A1.File=logs/error-${port}.log

log4j.appender.A1.DatePattern='.'-MM-dd

 

# A1 uses PatternLayout.

log4j.appender.A1.layout=org.apache.log4j.PatternLayout

log4j.appender.A1.layout.ConversionPattern=%d{DATE} %x [%t] %-5p %c %x -
%m%n

 



# HTTP Log config



 

log4j.appender.HTTP=org.apache.log4j.DailyRollingFileAppender

log4j.appender.HTTP.File=logs/http-${port}.log

log4j.appender.HTTP.DatePattern='.'-MM-dd

 

# A1 uses PatternLayout.

log4j.appender.HTTP.layout=org.apache.log4j.PatternLayout

 

log4j.appender.HTTP.layout.ConversionPattern=%m%n

 

 

I hope you can help me on this issue,

 

Cristian Jansenson

 


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.410 / Virus Database: 268.16.10/626 - Release Date: 1/14/2007
 


Re: cannot write to a file with rollingfileappender in log4j1.3

2007-01-15 Thread Surya Poola
Dirk,
   
  Thanks for your help,but iam sorry to query you once more:
   
  I already have gone through the document.My question is in log4j 1.2.8 i was 
using the following for DailyRollingFileAppender to map to configuration file :
  DOMConfigurator.configure(mLOG4JCONFIGFILE);
where mLOG4JCONFIGFILE was the property where i mentioned the location of xml 
file.
   
  But in 1.3 alpha-8,DOMConfigurator is depracated.
   
  So iam forced to use joranconfigurator,  by which iam not able to write to 
file,ie, file is not created.I am mentioning my program as follows:
  JoranConfigurator jc = new JoranConfigurator();
jc.doConfigure(mLOG4JCONFIGFILE, LogManager.getLoggerRepository());
   
  So can you let me kow how to configure with joranconfigurator or any other 
configurator.
   
  Thanks in advance
   
  Regards
  Rohan
  
Dirk Ooms <[EMAIL PROTECTED]> wrote:
  Rohan,

have a look at the 'Default Initalization Procedure' at 
http://logging.apache.org/log4j/docs/manual.html
it explains how log4j will find your config file.

dirk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 
-
No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.

Re: Want to maintain different logs for different users, in different files on the basis of user type

2007-01-15 Thread James Stauffer

How many different "types of users" do you have?  Are all types known
ahead of time?

On 1/15/07, Gajendra Pingalkar <[EMAIL PROTECTED]> wrote:

In my application, currently we r maintaining all logs in same file of Log4j.
Instead of that, i want to maintain logs seperatly depend-upon his user-type.
Whenever a specific user has get login, his information has been maintain in a
specific file, all other user has get login, same type as previous user, being
maintain in same file. When different type of user has get login, his
information should maintain in different file. As per considering my
requirement, please suggest some helpful idias and also code snipets , etc

Thanks and Regards,
Gajendra Pingalkar


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
James Staufferhttp://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cannot write to a file with rollingfileappender in log4j1.3

2007-01-15 Thread Dirk Ooms
Rohan,

have a look at the 'Default Initalization Procedure' at 
http://logging.apache.org/log4j/docs/manual.html
it explains how log4j will find your config file.

dirk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cannot write to a file with rollingfileappender in log4j1.3

2007-01-15 Thread Surya Poola
Hi Dirk,
   But how can i map to the log4j.xml file without use of joranconfigurator.I 
hope we need one configurator which maps to configuration file.
   
  So please let me know the procedure to map log4j.xml file which resides in 
specific location, or else the right usage of configurator for 
RollingFileAppender.
   
  Regards
  Rohan
  

Dirk Ooms <[EMAIL PROTECTED]> wrote:
  Rohan,

you can use the wizard http://wizardforge.org/pc?action=showVersion&id=28 to 
generate a valid log4j.xml
for your goal

you just have to create a logegr in your code (Logger.getLogger()), no need for 
the JoranConfigurator stuff.

dirk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 
-
The fish are biting.
 Get more visitors on your site using Yahoo! Search Marketing.

Want to maintain different logs for different users, in different files on the basis of user type

2007-01-15 Thread Gajendra Pingalkar
In my application, currently we r maintaining all logs in same file of Log4j. 
Instead of that, i want to maintain logs seperatly depend-upon his user-type. 
Whenever a specific user has get login, his information has been maintain in a 
specific file, all other user has get login, same type as previous user, being 
maintain in same file. When different type of user has get login, his 
information should maintain in different file. As per considering my 
requirement, please suggest some helpful idias and also code snipets , etc

Thanks and Regards,
Gajendra Pingalkar


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cannot write to a file with rollingfileappender in log4j1.3

2007-01-15 Thread Dirk Ooms
Rohan,

you can use the wizard http://wizardforge.org/pc?action=showVersion&id=28 to 
generate a valid log4j.xml
for your goal

you just have to create a logegr in your code (Logger.getLogger()), no need for 
the JoranConfigurator stuff.

dirk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cannot write to a file with rollingfileappender in log4j1.3

2007-01-15 Thread Surya Poola
Hi,
Iam new to log4j usage.My requirement is to wriite a log file and roll over 
monthly, but I want the file name that iam logging to be identified with date 
like xyz_01-2007.csv before rollover.
   
   
  Iam using log4j1.3 alpha-8 with rollingfileappender but file is not created 
and iam not able to debug or see any errors in my program.So can anyone help me 
in writing to a log file with rollingfileappender, or tell me what iam doing 
incorrectly.
   
  my config file looks like:
  
  
  http://jakarta.apache.org/log4j/"; 
debug="true">
  
  
  
  
  
  
  
  
  
  
  
  
   
  and 
   
  iam calling in my program like:
   
  logger=Logger.getLogger (classname.class.getName());
JoranConfigurator jc = new JoranConfigurator();

jc.doConfigure(mLOG4JCONFIGFILE, LogManager.getLoggerRepository());
logger.info("first error");

  Thanks in advance
   
  Regards
  Rohan

 
-
Check out the all-new Yahoo! Mail beta - Fire up a more powerful email and get 
things done faster.
 
-
Everyone is raving about the all-new Yahoo! Mail beta.