Jitendra Kharche | 1 Sep 2005 09:21

RE: log4j:ERROR... Please Help.


Other way is to explicitely tell log4j to use this file as follows
PropertyConfigurator.configure("abs-path-of-config-simple.properties"); 

~Jitendra

-----Original Message-----
From: Harp, George [mailto:GHarp <at> GAINSystems.com] 
Sent: Wednesday, August 31, 2005 8:49 PM
To: 'Log4J Users List'
Subject: RE: log4j:ERROR... Please Help.

ws the configuration file called log4j.properties and was it in your classpath?

-----Original Message-----
From: Silvia Suárez [mailto:sandrea_sb <at> hotmail.com]
Sent: Wednesday, August 31, 2005 10:17 AM
To: log4j-user <at> logging.apache.org
Subject: log4j:ERROR... Please Help.

Dear all,

I am using the log4j package for logging with java. The file down is the configuration file
(config-simple.properties. However next error appears when I am running my program:

log4j: ERROR No appenders could be found for category (sample.Myprogram2).

log4j: ERROR Please initialize the log4j System properly.

I am beggining on logging, I dont know what is the problem. Before, It was working and now it is not :-(
(Continue reading)

Benjamin David | 1 Sep 2005 10:48
Picon

Specifying logging levels independently

Hello,
 I am currently using log4j and I have a new requirement for specifying 
logging levels independently,
for instance, I would like to log only ERROR and WARNING.
As far as I am aware log4j does not support this.
Is a workaround available for this ?
 Thanks,
Ben
Bender Heri | 1 Sep 2005 11:12
Picon
Favicon

RE: Specifying logging levels independently

Of course you can do this.

Set either the level of the logger to the desired value:

        <level value="warning"/>

or set the threshold tag of an appender:

        <param name="Threshold" value="WARNING"/>

or define a filter withing an appender:

        <filter class="org.apache.log4j.varia.LevelRangeFilter">
            <param name="LevelMin" value="warn"/>
            <param name="LevelMax" value="fatal"/>
            <param name="AcceptOnMatch" value="false"/>
        </filter>

Heri

> -----Original Message-----
> From: Benjamin David [mailto:bdavid01 <at> gmail.com]
> Sent: Thursday, September 01, 2005 10:48 AM
> To: log4j-user <at> logging.apache.org
> Subject: Specifying logging levels independently
> 
> 
> Hello,
>  I am currently using log4j and I have a new requirement for 
> specifying 
(Continue reading)

Arunkumar | 1 Sep 2005 14:44

Log4j with 0 bytes - Rolling not happening properly

 I have a doubt w.r.t. the RollingFileAppender properties in 
log4j.xml. It somtimes just stop writing to the  log file. 
It happens when the file ended and it need to open new 
file. (I guess it dont succeed opening the new file).After
starting my program again it write to the file 
as needed(via log4j)  can you help me?It sometimes 
writes the file with 0 (zero) bytes. Can you please tell
me why the problem is? Im using the below properties 

<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>  
    <appender name="STDOUT" class="org.apache.log4j.
RollingFileAppender">    
       <param
name="File"value="/var/lsurf/log/sprint-alerts-cps/
sprint-alerts-cps.log"/>         
       <param name="MaxFileSize" value="250MB"/>    
       <param name="MaxBackupIndex" value = "50" />    
    <layout class="org.apache.log4j.PatternLayout">      
       <param name="ConversionPattern" value="%d{ABSOLUTE} %5p 
[%t] %c{1}:%L -  
       %m%n"/>
    </layout>  
   </appender>  
<category name="com.lightsurf.alertscore">    
    <priority value="info" />  
</category>  <root>    
<priority value="warn" />    
<appender-ref ref="STDOUT" />  </root>
</log4j:configuration>

(Continue reading)

James Stauffer | 1 Sep 2005 16:21
Picon

Re: Specifying logging levels independently

Do I understand correctly that you want WARN and ERROR but not FATAL? 
If that is correct I am curious to hear why that would be.

On 9/1/05, Benjamin David <bdavid01 <at> gmail.com> wrote:
> Hello,
>  I am currently using log4j and I have a new requirement for specifying
> logging levels independently,
> for instance, I would like to log only ERROR and WARNING.
> As far as I am aware log4j does not support this.
> Is a workaround available for this ?
>  Thanks,
> Ben
> 
> 

--

-- 
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/
Silvia Suárez | 1 Sep 2005 17:52
Picon
Favicon

RE: log4j:ERROR... Please Help.

Dear all,

Thanks a lot for your responses. Now It looks like that it is working :-)

Silvia

>From: "Jitendra Kharche" <Jitendra.Kharche <at> geometricsoftware.com>
>Reply-To: "Log4J Users List" <log4j-user <at> logging.apache.org>
>To: "Log4J Users List" <log4j-user <at> logging.apache.org>
>Subject: RE: log4j:ERROR... Please Help.
>Date: Thu, 1 Sep 2005 12:51:35 +0530
>
>
>Other way is to explicitely tell log4j to use this file as follows
>PropertyConfigurator.configure("abs-path-of-config-simple.properties");
>
>~Jitendra
>
>-----Original Message-----
>From: Harp, George [mailto:GHarp <at> GAINSystems.com]
>Sent: Wednesday, August 31, 2005 8:49 PM
>To: 'Log4J Users List'
>Subject: RE: log4j:ERROR... Please Help.
>
>ws the configuration file called log4j.properties and was it in your 
>classpath?
>
>-----Original Message-----
>From: Silvia Suárez [mailto:sandrea_sb <at> hotmail.com]
>Sent: Wednesday, August 31, 2005 10:17 AM
(Continue reading)

Rakesh Patel | 1 Sep 2005 22:24

Chainsaw Features I'd Like To See

i could not find a place to send my suggestions regarding chainsaw, so i 
thought i'd posted them here because lot of the log4j/chainsaw contributors 
read this group.

an ability to set chainsaw to make a noise, flash, send email when it see 
message of a certain pattern come across of a certain level/error. Now that 
would be cool. I don't want to be staring the chainsaw monitor all the time.

rakesh
Scott Deboy | 1 Sep 2005 22:45

RE: Chainsaw Features I'd Like To See

Good idea.  

Maybe something like JToaster (depending on license) or just a noise,
triggered by a user-defined expression?

-----Original Message-----
From: news [mailto:news <at> sea.gmane.org] On Behalf Of Rakesh Patel
Sent: Thursday, September 01, 2005 1:25 PM
To: log4j-user <at> logging.apache.org
Subject: Chainsaw Features I'd Like To See

i could not find a place to send my suggestions regarding chainsaw, so i
thought i'd posted them here because lot of the log4j/chainsaw
contributors read this group.

an ability to set chainsaw to make a noise, flash, send email when it
see message of a certain pattern come across of a certain level/error.
Now that would be cool. I don't want to be staring the chainsaw monitor
all the time.

rakesh

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe <at> logging.apache.org
For additional commands, e-mail: log4j-user-help <at> logging.apache.org
Scott Deboy | 1 Sep 2005 23:00

RE: Chainsaw Features I'd Like To See

I've made a wiki page that will have Chainsaw Q&A's and could be a place
to post suggestions - please feel free to post
thoughts/suggestions/comments/etc there.

http://wiki.apache.org/logging-log4j/ChainsawHelp

Scott

-----Original Message-----
From: news [mailto:news <at> sea.gmane.org] On Behalf Of Rakesh Patel
Sent: Thursday, September 01, 2005 1:25 PM
To: log4j-user <at> logging.apache.org
Subject: Chainsaw Features I'd Like To See

i could not find a place to send my suggestions regarding chainsaw, so i
thought i'd posted them here because lot of the log4j/chainsaw
contributors read this group.

an ability to set chainsaw to make a noise, flash, send email when it
see message of a certain pattern come across of a certain level/error.
Now that would be cool. I don't want to be staring the chainsaw monitor
all the time.

rakesh

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe <at> logging.apache.org
For additional commands, e-mail: log4j-user-help <at> logging.apache.org
Paul Smith | 2 Sep 2005 00:09

Re: Chainsaw Features I'd Like To See

I wrote a swing app that read monitoring data from our main  
application, and one of our directors asked that it be changed to  
play this (hideously) loud air-raid siren when the performance of the  
application went above a threshold.

It was cool for the first and second time, but got real old fast.

But it's straight forward to add as an optional feature.

Paul

On 02/09/2005, at 6:45 AM, Scott Deboy wrote:

> Good idea.
>
> Maybe something like JToaster (depending on license) or just a noise,
> triggered by a user-defined expression?
>
> -----Original Message-----
> From: news [mailto:news <at> sea.gmane.org] On Behalf Of Rakesh Patel
> Sent: Thursday, September 01, 2005 1:25 PM
> To: log4j-user <at> logging.apache.org
> Subject: Chainsaw Features I'd Like To See
>
> i could not find a place to send my suggestions regarding chainsaw,  
> so i
> thought i'd posted them here because lot of the log4j/chainsaw
> contributors read this group.
>
> an ability to set chainsaw to make a noise, flash, send email when it
(Continue reading)


Gmane