RE: org.apache.log4j.net.SocketAppender - Help with setLocationIn fo

2002-11-08 Thread Ceki Gülcü

log4j location info behavior does NOT depend on the JDK, at least not on 
1.3 or 1.4.

At 11:47 08.11.2002 +1000, you wrote:
Figured this one out,

I'm using Jdev9i 9.0.3
It lets you choose which version of java to use, in the projects where
location is not working they are using 1.3
In the projects where it does work it is using 1.4

Nicholas Orr

-Original Message-
From: Nicholas Orr [mailto:Nicholas.Orr@;mim.com.au]
Sent: Friday, 8 November 2002 11:19 AM
To: Log4j Mailing List
Subject: org.apache.log4j.net.SocketAppender - Help with setLocationInfo


Hi,

I have just started to use Log4j and am having an inconsistency problem.

My log4j.properties file looks like this

log4j.appender.CHAINSAW_CLIENT=org.apache.log4j.net.SocketAppender
log4j.appender.CHAINSAW_CLIENT.LocationInfo=true
log4j.appender.CHAINSAW_CLIENT.Port=4445
log4j.appender.CHAINSAW_CLIENT.RemoteHost=localhost
log4j.rootLogger=DEBUG, CHAINSAW_CLIENT

I use this for debugging.  In one project I get location info but in another
one I don't get location info. What is going on??

Here is the code I'm using in both

<--- start code --->

package com.move.cool;

import org.apache.log4j.*;

public class LogMe  {
  private static Logger log = Logger.getLogger(LogMe.class.getName());

  public LogMe() {

log.info("--Hello1");
log.info("--Hello3");
log.error("--Hello5");
log.warn("--Hello6");
log.error("MAJOR PROBLEM");
System.out.println("End");
  }


  public static void main(String[] args) {
System.out.println("Begin");
LogMe logMe = new LogMe();
System.out.println("End");
  }
}

<--- end code --->



**
The information contained in this e-mail is confidential and is intended
only for the use of the addressee(s). If you receive this e-mail in error,
any use, distribution or copying of this e-mail is not permitted. You are
requested to forward unwanted e-mail and address any problems to the MIM
Holdings Limited Support Centre.

For general enquires:   ++61 7 3833 8000
Support Centre e-mail:  [EMAIL PROTECTED]
Support Centre phone:   Australia 1800500646
International ++61 7 38338042
**


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
Ceki

TCP implementations will follow a general principle of robustness: be
conservative in what you do, be liberal in what you accept from
others. -- Jon Postel, RFC 793



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Query

2002-11-08 Thread Rubal Sher
Hi all -

I am new to log4j and the mailing list. I have a query and I would
appreciate if anyone can post a reply.

My requirement is that  I need to have my log file names as per the
following format:
file_MMDD_hh:mm:ss
where "file_" is a fixed string, MM denotes month of the year, DD denotes
the date of the month,  denotes the year, "hh" denotes the hour of the
day, "mm" denotes the minute of the hour and "ss" denotes the seconds.

This seems to be simple to implement if I use the
"DailyRollingFileAppender". The problem is that the file I write to should
roll over ONLY at midnight. If I set the "DateFormat" to roll over at
midnight, then I do not get the "hh:mm:ss" appended to the file.
Furthermore, how do I use a colon in the filename above??

I have an additional requirement. In addition to having the file rolled over
daily at midnight, I also need to specify a max file size for each file. I
understand that the maximum file size can be implemented using the
"RollingFileAppender". So, do I use the RollingFileAppender or the
DailyRollingFileAppender and is there any way I can configure log4j to
integrate the above two desired features?

This is the reason(max file size) why we have the "hh:mm:ss" field in the
filename, in addition to the date(although it rolls over only at midnight
provided the max file size is not reached). Can anyone help?

Thanks and regards,
Rubal.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Query

2002-11-08 Thread Ceki Gülcü

This will be possible in version log4j 1.3. In 1.2 you have to do it yourself.

At 14:10 08.11.2002 +0530, you wrote:

Hi all -

I am new to log4j and the mailing list. I have a query and I would
appreciate if anyone can post a reply.

My requirement is that  I need to have my log file names as per the
following format:
file_MMDD_hh:mm:ss
where "file_" is a fixed string, MM denotes month of the year, DD denotes
the date of the month,  denotes the year, "hh" denotes the hour of the
day, "mm" denotes the minute of the hour and "ss" denotes the seconds.

This seems to be simple to implement if I use the
"DailyRollingFileAppender". The problem is that the file I write to should
roll over ONLY at midnight. If I set the "DateFormat" to roll over at
midnight, then I do not get the "hh:mm:ss" appended to the file.
Furthermore, how do I use a colon in the filename above??

I have an additional requirement. In addition to having the file rolled over
daily at midnight, I also need to specify a max file size for each file. I
understand that the maximum file size can be implemented using the
"RollingFileAppender". So, do I use the RollingFileAppender or the
DailyRollingFileAppender and is there any way I can configure log4j to
integrate the above two desired features?

This is the reason(max file size) why we have the "hh:mm:ss" field in the
filename, in addition to the date(although it rolls over only at midnight
provided the max file size is not reached). Can anyone help?

Thanks and regards,
Rubal.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
Ceki

TCP implementations will follow a general principle of robustness: be
conservative in what you do, be liberal in what you accept from
others. -- Jon Postel, RFC 793



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Query

2002-11-08 Thread Rubal Sher
Thanks, I am using version 1.2.7
This is what I downloaded from the log4j website.

Is version 1.3 available since 1.2.7 seems to be the latest on their
website? If it is available, where can I get it from?

Regards,
Rubal.

- Original Message -
From: "Ceki Gülcü" <[EMAIL PROTECTED]>
To: "Log4J Users List" <[EMAIL PROTECTED]>
Sent: Friday, November 08, 2002 2:17 PM
Subject: Re: Query


>
> This will be possible in version log4j 1.3. In 1.2 you have to do it
yourself.
>
> At 14:10 08.11.2002 +0530, you wrote:
> >Hi all -
> >
> >I am new to log4j and the mailing list. I have a query and I would
> >appreciate if anyone can post a reply.
> >
> >My requirement is that  I need to have my log file names as per the
> >following format:
> >file_MMDD_hh:mm:ss
> >where "file_" is a fixed string, MM denotes month of the year, DD denotes
> >the date of the month,  denotes the year, "hh" denotes the hour of
the
> >day, "mm" denotes the minute of the hour and "ss" denotes the seconds.
> >
> >This seems to be simple to implement if I use the
> >"DailyRollingFileAppender". The problem is that the file I write to
should
> >roll over ONLY at midnight. If I set the "DateFormat" to roll over at
> >midnight, then I do not get the "hh:mm:ss" appended to the file.
> >Furthermore, how do I use a colon in the filename above??
> >
> >I have an additional requirement. In addition to having the file rolled
over
> >daily at midnight, I also need to specify a max file size for each file.
I
> >understand that the maximum file size can be implemented using the
> >"RollingFileAppender". So, do I use the RollingFileAppender or the
> >DailyRollingFileAppender and is there any way I can configure log4j to
> >integrate the above two desired features?
> >
> >This is the reason(max file size) why we have the "hh:mm:ss" field in the
> >filename, in addition to the date(although it rolls over only at midnight
> >provided the max file size is not reached). Can anyone help?
> >
> >Thanks and regards,
> >Rubal.
> >
> >
> >--
> >To unsubscribe, e-mail:

> >For additional commands, e-mail:

>
> --
> Ceki
>
> TCP implementations will follow a general principle of robustness: be
> conservative in what you do, be liberal in what you accept from
> others. -- Jon Postel, RFC 793
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Query

2002-11-08 Thread Ceki Gülcü

Log4j 1.3 is not yet available. It might go alpha in December or January 
2003 or maybe later... :-)

To follow development more closely you can subscribe to the log4j-dev list.

At 14:29 08.11.2002 +0530, you wrote:
Thanks, I am using version 1.2.7
This is what I downloaded from the log4j website.

Is version 1.3 available since 1.2.7 seems to be the latest on their
website? If it is available, where can I get it from?

Regards,
Rubal.

- Original Message -
From: "Ceki Gülcü" <[EMAIL PROTECTED]>
To: "Log4J Users List" <[EMAIL PROTECTED]>
Sent: Friday, November 08, 2002 2:17 PM
Subject: Re: Query


>
> This will be possible in version log4j 1.3. In 1.2 you have to do it
yourself.
>
> At 14:10 08.11.2002 +0530, you wrote:
> >Hi all -
> >
> >I am new to log4j and the mailing list. I have a query and I would
> >appreciate if anyone can post a reply.
> >
> >My requirement is that  I need to have my log file names as per the
> >following format:
> >file_MMDD_hh:mm:ss
> >where "file_" is a fixed string, MM denotes month of the year, DD denotes
> >the date of the month,  denotes the year, "hh" denotes the hour of
the
> >day, "mm" denotes the minute of the hour and "ss" denotes the seconds.
> >
> >This seems to be simple to implement if I use the
> >"DailyRollingFileAppender". The problem is that the file I write to
should
> >roll over ONLY at midnight. If I set the "DateFormat" to roll over at
> >midnight, then I do not get the "hh:mm:ss" appended to the file.
> >Furthermore, how do I use a colon in the filename above??
> >
> >I have an additional requirement. In addition to having the file rolled
over
> >daily at midnight, I also need to specify a max file size for each file.
I
> >understand that the maximum file size can be implemented using the
> >"RollingFileAppender". So, do I use the RollingFileAppender or the
> >DailyRollingFileAppender and is there any way I can configure log4j to
> >integrate the above two desired features?
> >
> >This is the reason(max file size) why we have the "hh:mm:ss" field in the
> >filename, in addition to the date(although it rolls over only at midnight
> >provided the max file size is not reached). Can anyone help?
> >
> >Thanks and regards,
> >Rubal.
> >
> >
> >--
> >To unsubscribe, e-mail:

> >For additional commands, e-mail:

>
> --
> Ceki
>
> TCP implementations will follow a general principle of robustness: be
> conservative in what you do, be liberal in what you accept from
> others. -- Jon Postel, RFC 793
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
Ceki

TCP implementations will follow a general principle of robustness: be
conservative in what you do, be liberal in what you accept from
others. -- Jon Postel, RFC 793



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Query

2002-11-08 Thread Rubal Sher
Thanks for the info. Can you please tell me though how I could use a ":"
(colon) as part of a filename ?? Or if a colon can be used at all?

Regards,
Rubal.
- Original Message -
From: "Ceki Gülcü" <[EMAIL PROTECTED]>
To: "Log4J Users List" <[EMAIL PROTECTED]>
Sent: Friday, November 08, 2002 3:35 PM
Subject: Re: Query



Log4j 1.3 is not yet available. It might go alpha in December or January
2003 or maybe later... :-)

To follow development more closely you can subscribe to the log4j-dev list.

At 14:29 08.11.2002 +0530, you wrote:
>Thanks, I am using version 1.2.7
>This is what I downloaded from the log4j website.
>
>Is version 1.3 available since 1.2.7 seems to be the latest on their
>website? If it is available, where can I get it from?
>
>Regards,
>Rubal.
>
>- Original Message -
>From: "Ceki Gülcü" <[EMAIL PROTECTED]>
>To: "Log4J Users List" <[EMAIL PROTECTED]>
>Sent: Friday, November 08, 2002 2:17 PM
>Subject: Re: Query
>
>
> >
> > This will be possible in version log4j 1.3. In 1.2 you have to do it
>yourself.
> >
> > At 14:10 08.11.2002 +0530, you wrote:
> > >Hi all -
> > >
> > >I am new to log4j and the mailing list. I have a query and I would
> > >appreciate if anyone can post a reply.
> > >
> > >My requirement is that  I need to have my log file names as per the
> > >following format:
> > >file_MMDD_hh:mm:ss
> > >where "file_" is a fixed string, MM denotes month of the year, DD
denotes
> > >the date of the month,  denotes the year, "hh" denotes the hour of
>the
> > >day, "mm" denotes the minute of the hour and "ss" denotes the seconds.
> > >
> > >This seems to be simple to implement if I use the
> > >"DailyRollingFileAppender". The problem is that the file I write to
>should
> > >roll over ONLY at midnight. If I set the "DateFormat" to roll over at
> > >midnight, then I do not get the "hh:mm:ss" appended to the file.
> > >Furthermore, how do I use a colon in the filename above??
> > >
> > >I have an additional requirement. In addition to having the file rolled
>over
> > >daily at midnight, I also need to specify a max file size for each
file.
>I
> > >understand that the maximum file size can be implemented using the
> > >"RollingFileAppender". So, do I use the RollingFileAppender or the
> > >DailyRollingFileAppender and is there any way I can configure log4j to
> > >integrate the above two desired features?
> > >
> > >This is the reason(max file size) why we have the "hh:mm:ss" field in
the
> > >filename, in addition to the date(although it rolls over only at
midnight
> > >provided the max file size is not reached). Can anyone help?
> > >
> > >Thanks and regards,
> > >Rubal.
> > >
> > >
> > >--
> > >To unsubscribe, e-mail:
>
> > >For additional commands, e-mail:
>
> >
> > --
> > Ceki
> >
> > TCP implementations will follow a general principle of robustness: be
> > conservative in what you do, be liberal in what you accept from
> > others. -- Jon Postel, RFC 793
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
>
> > For additional commands, e-mail:
>
> >
>
>
>--
>To unsubscribe, e-mail:

>For additional commands, e-mail:


--
Ceki

TCP implementations will follow a general principle of robustness: be
conservative in what you do, be liberal in what you accept from
others. -- Jon Postel, RFC 793



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: log4j SocketAppender questions

2002-11-08 Thread Ricardo Moral
--- Samuel Cheung <[EMAIL PROTECTED]> wrote:
> Thanks. Then shouldn't append() be protected instead
> of public? So that
> application can not call append() and call
> doAppend() instead?

In the version I have 1.2.7 the append() method of
AppenderEskeleton is protected. So this is OK.

> 
> And do you know the answer of my Network
> transmittion question? Does every
> append result in transmitting a packet?
> 

No there is no buffer in SocketAppender. The
LoggingEvent to be logged will be written directly to
a ObjectOutputStream that wrapps the OutputStream of
the socket. So if you need buffering you can wrapp the
SocketAppender in a Appender that implements buffering
and wrapps this appender. For this you might use
AsyncAppender.

> 
> -Original Message-
> From: Ricardo Moral [mailto:ricardo_moral@;yahoo.com]
> Sent: Thursday, November 07, 2002 3:04 PM
> To: Log4J Users List
> Subject: Re: log4j SocketAppender questions
> 
> 
> No, there is no need to synchronize the log method
> before calling any logger that uses this appender.
> 
> This is because this appender extends the
> AppenderSkeleton class. The AppenderSkeleton class
> is
> the base class for many of the Appenders (Console,
> JDBC, etc) and implements the
> doAppend(LoggingEvent) method wich is
> the
> method called by the Logger to report LoggingEvents.
> This method is synchronized and calls the
> append(LoggingEvent) that is an
> abstract
> method that must be implemented in subclases... 
> 
> 
> 
> --- Samuel Cheung <[EMAIL PROTECTED]> wrote:
> > Hi,
> > 
> > Is SocketAppender in log4j thread safe? If I have
> > multiple threads log to
> > the same SocketAppender, do I need to synchronize
> > that the log method? 
> > 
> > And does SocketAppender have any internal buffer?
> > Will every log() call
> > result in a network transmission? Or
> SocketAppender
> > will buffer all the logs
> > until it reaches certain limit before it sends out
> > the log thru the network
> > transmission.
> > 
> > Thank you for any information.
> > Sam
> > 
> > --
> > To unsubscribe, e-mail:  
> > 
> > For additional commands, e-mail:
> > 
> > 
> 
> 
> __
> Do you Yahoo!?
> U2 on LAUNCH - Exclusive greatest hits videos
> http://launch.yahoo.com/u2
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: org.apache.log4j.net.SocketAppender - Help with setLocationIn fo

2002-11-08 Thread Thomas Saxtoft
--- In [EMAIL PROTECTED], Ceki Gülcü <[EMAIL PROTECTED]> wrote:
> log4j location info behavior does NOT depend on the JDK, at least
> not on 1.3 or 1.4.
That is true, but not very helpful. Gautam gave me the answer a few days ago:
http://groups.yahoo.com/group/Log4J/message/2970
Or at least what I think could be your problem.

Thomas Saxtoft



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




log4j messages to String conversion?

2002-11-08 Thread Dirk
Hi,

my question is, whether it is possible to get the output string of a
method-call like this:  logger.debug("message").
I would like to send that String (which is perfectly outputted on my
console) over an RMI connection.


Thanx a lot,
Dirk Hopmann


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: log4j messages to String conversion?

2002-11-08 Thread Ricardo Moral
What do u need? The formatted event message? What do u
need this for? 


--- Dirk <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> my question is, whether it is possible to get the
> output string of a
> method-call like this:  logger.debug("message").
> I would like to send that String (which is perfectly
> outputted on my
> console) over an RMI connection.
> 
> 
> Thanx a lot,
> Dirk Hopmann
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: log4j messages to String conversion?

2002-11-08 Thread Dirk Hopmann
Hi,

I just want to send the completely formatted string (like: '0 [main]
com.foo.bar - this is the message') via an RMI connection, that is already
implemented and must be used...

My problem is, that the output string is only send to the console and I am
not able to convert it to a String, to use it in my program.

Regards,
Dirk Hopmann



- Original Message -
From: "Ricardo Moral" <[EMAIL PROTECTED]>
To: "Log4J Users List" <[EMAIL PROTECTED]>
Sent: Friday, November 08, 2002 3:56 PM
Subject: Re: log4j messages to String conversion?


> What do u need? The formatted event message? What do u
> need this for?
>
>
> --- Dirk <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > my question is, whether it is possible to get the
> > output string of a
> > method-call like this:  logger.debug("message").
> > I would like to send that String (which is perfectly
> > outputted on my
> > console) over an RMI connection.
> >
> >
> > Thanx a lot,
> > Dirk Hopmann
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: log4j messages to String conversion?

2002-11-08 Thread Shapira, Yoav
Hi,
Perhaps you could configure log4j to use different / additional
appenders to help your task.  The console is annoying.

A file appender would write to a file, and you could then stream the
contents of the file over RMI in whatever chunks fits your system.

A socket appender could write directly to the network port you want.  A
JMS appender would send stuff to a JMS queue, and the process on the
other side could read it...

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Dirk Hopmann [mailto:hopmann@;c-lab.de]
>Sent: Friday, November 08, 2002 10:16 AM
>To: Log4J Users List
>Subject: Re: log4j messages to String conversion?
>
>Hi,
>
>I just want to send the completely formatted string (like: '0 [main]
>com.foo.bar - this is the message') via an RMI connection, that is
already
>implemented and must be used...
>
>My problem is, that the output string is only send to the console and I
am
>not able to convert it to a String, to use it in my program.
>
>Regards,
>Dirk Hopmann
>
>
>
>- Original Message -
>From: "Ricardo Moral" <[EMAIL PROTECTED]>
>To: "Log4J Users List" <[EMAIL PROTECTED]>
>Sent: Friday, November 08, 2002 3:56 PM
>Subject: Re: log4j messages to String conversion?
>
>
>> What do u need? The formatted event message? What do u
>> need this for?
>>
>>
>> --- Dirk <[EMAIL PROTECTED]> wrote:
>> > Hi,
>> >
>> > my question is, whether it is possible to get the
>> > output string of a
>> > method-call like this:  logger.debug("message").
>> > I would like to send that String (which is perfectly
>> > outputted on my
>> > console) over an RMI connection.
>> >
>> >
>> > Thanx a lot,
>> > Dirk Hopmann
>> >
>> >
>> > --
>> > To unsubscribe, e-mail:
>> > 
>> > For additional commands, e-mail:
>> > 
>> >
>>
>>
>>
>>
>> --
>> To unsubscribe, e-mail:
>
>> For additional commands, e-mail:
>
>>
>>
>
>
>--
>To unsubscribe, e-mail:   [EMAIL PROTECTED]>
>For additional commands, e-mail: [EMAIL PROTECTED]>


This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


RE: log4j SocketAppender questions

2002-11-08 Thread Samuel Cheung
Ricardo,

Yes, the append() method of AppenderEskeleton is protected but the append()
method of SocketAppender() is public. The append() method of
SocketAppender() should be protected as well. Is that correct?

-Original Message-
From: Ricardo Moral [mailto:ricardo_moral@;yahoo.com]
Sent: Friday, November 08, 2002 7:05 AM
To: Log4J Users List
Subject: RE: log4j SocketAppender questions


--- Samuel Cheung <[EMAIL PROTECTED]> wrote:
> Thanks. Then shouldn't append() be protected instead
> of public? So that
> application can not call append() and call
> doAppend() instead?

In the version I have 1.2.7 the append() method of
AppenderEskeleton is protected. So this is OK.

> 
> And do you know the answer of my Network
> transmittion question? Does every
> append result in transmitting a packet?
> 

No there is no buffer in SocketAppender. The
LoggingEvent to be logged will be written directly to
a ObjectOutputStream that wrapps the OutputStream of
the socket. So if you need buffering you can wrapp the
SocketAppender in a Appender that implements buffering
and wrapps this appender. For this you might use
AsyncAppender.

> 
> -Original Message-
> From: Ricardo Moral [mailto:ricardo_moral@;yahoo.com]
> Sent: Thursday, November 07, 2002 3:04 PM
> To: Log4J Users List
> Subject: Re: log4j SocketAppender questions
> 
> 
> No, there is no need to synchronize the log method
> before calling any logger that uses this appender.
> 
> This is because this appender extends the
> AppenderSkeleton class. The AppenderSkeleton class
> is
> the base class for many of the Appenders (Console,
> JDBC, etc) and implements the
> doAppend(LoggingEvent) method wich is
> the
> method called by the Logger to report LoggingEvents.
> This method is synchronized and calls the
> append(LoggingEvent) that is an
> abstract
> method that must be implemented in subclases... 
> 
> 
> 
> --- Samuel Cheung <[EMAIL PROTECTED]> wrote:
> > Hi,
> > 
> > Is SocketAppender in log4j thread safe? If I have
> > multiple threads log to
> > the same SocketAppender, do I need to synchronize
> > that the log method? 
> > 
> > And does SocketAppender have any internal buffer?
> > Will every log() call
> > result in a network transmission? Or
> SocketAppender
> > will buffer all the logs
> > until it reaches certain limit before it sends out
> > the log thru the network
> > transmission.
> > 
> > Thank you for any information.
> > Sam
> > 
> > --
> > To unsubscribe, e-mail:  
> > 
> > For additional commands, e-mail:
> > 
> > 
> 
> 
> __
> Do you Yahoo!?
> U2 on LAUNCH - Exclusive greatest hits videos
> http://launch.yahoo.com/u2
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: log4j SocketAppender questions

2002-11-08 Thread Ricardo Moral
Yes... You r right. It should be protected. You
shouldnt call this method directly this method should
by called only by the Log4j classes.

--- Samuel Cheung <[EMAIL PROTECTED]> wrote:
> Ricardo,
> 
> Yes, the append() method of AppenderEskeleton is
> protected but the append()
> method of SocketAppender() is public. The append()
> method of
> SocketAppender() should be protected as well. Is
> that correct?
> 
> -Original Message-
> From: Ricardo Moral [mailto:ricardo_moral@;yahoo.com]
> Sent: Friday, November 08, 2002 7:05 AM
> To: Log4J Users List
> Subject: RE: log4j SocketAppender questions
> 
> 
> --- Samuel Cheung <[EMAIL PROTECTED]> wrote:
> > Thanks. Then shouldn't append() be protected
> instead
> > of public? So that
> > application can not call append() and call
> > doAppend() instead?
> 
> In the version I have 1.2.7 the append() method of
> AppenderEskeleton is protected. So this is OK.
> 
> > 
> > And do you know the answer of my Network
> > transmittion question? Does every
> > append result in transmitting a packet?
> > 
> 
> No there is no buffer in SocketAppender. The
> LoggingEvent to be logged will be written directly
> to
> a ObjectOutputStream that wrapps the OutputStream of
> the socket. So if you need buffering you can wrapp
> the
> SocketAppender in a Appender that implements
> buffering
> and wrapps this appender. For this you might use
> AsyncAppender.
> 
> > 
> > -Original Message-
> > From: Ricardo Moral
> [mailto:ricardo_moral@;yahoo.com]
> > Sent: Thursday, November 07, 2002 3:04 PM
> > To: Log4J Users List
> > Subject: Re: log4j SocketAppender questions
> > 
> > 
> > No, there is no need to synchronize the log method
> > before calling any logger that uses this appender.
> > 
> > This is because this appender extends the
> > AppenderSkeleton class. The AppenderSkeleton class
> > is
> > the base class for many of the Appenders (Console,
> > JDBC, etc) and implements the
> > doAppend(LoggingEvent) method wich is
> > the
> > method called by the Logger to report
> LoggingEvents.
> > This method is synchronized and calls the
> > append(LoggingEvent) that is an
> > abstract
> > method that must be implemented in subclases... 
> > 
> > 
> > 
> > --- Samuel Cheung <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > > 
> > > Is SocketAppender in log4j thread safe? If I
> have
> > > multiple threads log to
> > > the same SocketAppender, do I need to
> synchronize
> > > that the log method? 
> > > 
> > > And does SocketAppender have any internal
> buffer?
> > > Will every log() call
> > > result in a network transmission? Or
> > SocketAppender
> > > will buffer all the logs
> > > until it reaches certain limit before it sends
> out
> > > the log thru the network
> > > transmission.
> > > 
> > > Thank you for any information.
> > > Sam
> > > 
> > > --
> > > To unsubscribe, e-mail:  
> > >
> 
> > > For additional commands, e-mail:
> > > 
> > > 
> > 
> > 
> > __
> > Do you Yahoo!?
> > U2 on LAUNCH - Exclusive greatest hits videos
> > http://launch.yahoo.com/u2
> > 
> > --
> > To unsubscribe, e-mail:  
> > 
> > For additional commands, e-mail:
> > 
> > 
> > --
> > To unsubscribe, e-mail:  
> > 
> > For additional commands, e-mail:
> > 
> > 
> 
> 
> __
> Do you Yahoo!?
> U2 on LAUNCH - Exclusive greatest hits videos
> http://launch.yahoo.com/u2
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: log4j messages to String conversion?

2002-11-08 Thread Ricardo Moral
Shapira is right. Other way is to implement your own
appender to do the job. Then register this appender
with the corresponding logger.

--- "Shapira, Yoav" <[EMAIL PROTECTED]> wrote:
> Hi,
> Perhaps you could configure log4j to use different /
> additional
> appenders to help your task.  The console is
> annoying.
> 
> A file appender would write to a file, and you could
> then stream the
> contents of the file over RMI in whatever chunks
> fits your system.
> 
> A socket appender could write directly to the
> network port you want.  A
> JMS appender would send stuff to a JMS queue, and
> the process on the
> other side could read it...
> 
> Yoav Shapira
> Millennium ChemInformatics
> 
> 
> >-Original Message-
> >From: Dirk Hopmann [mailto:hopmann@;c-lab.de]
> >Sent: Friday, November 08, 2002 10:16 AM
> >To: Log4J Users List
> >Subject: Re: log4j messages to String conversion?
> >
> >Hi,
> >
> >I just want to send the completely formatted string
> (like: '0 [main]
> >com.foo.bar - this is the message') via an RMI
> connection, that is
> already
> >implemented and must be used...
> >
> >My problem is, that the output string is only send
> to the console and I
> am
> >not able to convert it to a String, to use it in my
> program.
> >
> >Regards,
> >Dirk Hopmann
> >
> >
> >
> >- Original Message -
> >From: "Ricardo Moral" <[EMAIL PROTECTED]>
> >To: "Log4J Users List"
> <[EMAIL PROTECTED]>
> >Sent: Friday, November 08, 2002 3:56 PM
> >Subject: Re: log4j messages to String conversion?
> >
> >
> >> What do u need? The formatted event message? What
> do u
> >> need this for?
> >>
> >>
> >> --- Dirk <[EMAIL PROTECTED]> wrote:
> >> > Hi,
> >> >
> >> > my question is, whether it is possible to get
> the
> >> > output string of a
> >> > method-call like this: 
> logger.debug("message").
> >> > I would like to send that String (which is
> perfectly
> >> > outputted on my
> >> > console) over an RMI connection.
> >> >
> >> >
> >> > Thanx a lot,
> >> > Dirk Hopmann
> >> >
> >> >
> >> > --
> >> > To unsubscribe, e-mail:
> >> >
> 
> >> > For additional commands, e-mail:
> >> > 
> >> >
> >>
> >>
> >>
> >>
> >> --
> >> To unsubscribe, e-mail:
> >
> >> For additional commands, e-mail:
> >
> >>
> >>
> >
> >
> >--
> >To unsubscribe, e-mail:    >[EMAIL PROTECTED]>
> >For additional commands, e-mail:
>  >[EMAIL PROTECTED]>
> 
> > This e-mail, including any attachments, is a
> confidential business communication, and may contain
> information that is confidential, proprietary and/or
> privileged.  This e-mail is intended only for the
> individual(s) to whom it is addressed, and may not
> be saved, copied, printed, disclosed or used by
> anyone else.  If you are not the(an) intended
> recipient, please immediately delete this e-mail
> from your computer system and notify the sender. 
> Thank you.
> 
> > --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:



__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: %P and %H addition to PatternLayout

2002-11-08 Thread Daniel . Hannum

I'd love for this to be addressed. I don't want this message to be quietly
ignored, so... bump.

These are required in my work. If we don't do this, then I'll have to hack
it up myself. However, I believe Java doesn't provide a means to get a pid.
I'm not sure if this is true, but it would throw a wrench in this.

Does anyone know if these can be done? Or if the developers want this to be
done? Cuz a patch is trivial if Java provides the functions.

dan





Mike Schilli <[EMAIL PROTECTED]> on 11/07/2002 09:34:43 PM

Please respond to "Log4J Users List" <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:

Subject:  %P and %H addition to PatternLayout


Hi folks,

the Log4perl group has been receiving requests on adding %P (current
process id) and %H (hostname) to the PatternLayout format descriptors.
These seem to be features many people want in their log files, for
tracking which process wrote the message and on which host it happened
if logging is centralized. What do you guys think, would you want to add
them to log4j?

--
-- Mike

Mike Schilli
[EMAIL PROTECTED]



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 










---
This message and any included attachments are from Siemens Medical Solutions 
Health Services Corporation and are intended only for the addressee(s).  
The information contained herein may include trade secrets or privileged or 
otherwise confidential information.  Unauthorized review, forwarding, printing, 
copying, distributing, or using such information is strictly prohibited and may 
be unlawful.  If you received this message in error, or have reason to believe 
you are not authorized to receive it, please promptly delete this message and 
notify the sender by e-mail with a copy to [EMAIL PROTECTED]  Thank you

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: %P and %H addition to PatternLayout

2002-11-08 Thread Cakalic, James
Hostname yes. Can't get pid without using native code. 

-Original Message-
From: [EMAIL PROTECTED] [mailto:Daniel.Hannum@;smed.com]
Sent: Friday, November 08, 2002 10:04 AM
To: Log4J Users List
Subject: Re: %P and %H addition to PatternLayout



I'd love for this to be addressed. I don't want this message to be
quietly
ignored, so... bump.

These are required in my work. If we don't do this, then I'll have to
hack
it up myself. However, I believe Java doesn't provide a means to get a
pid.
I'm not sure if this is true, but it would throw a wrench in this.

Does anyone know if these can be done? Or if the developers want this to
be
done? Cuz a patch is trivial if Java provides the functions.

dan





Mike Schilli <[EMAIL PROTECTED]> on 11/07/2002 09:34:43 PM

Please respond to "Log4J Users List" <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:

Subject:  %P and %H addition to PatternLayout


Hi folks,

the Log4perl group has been receiving requests on adding %P (current
process id) and %H (hostname) to the PatternLayout format descriptors.
These seem to be features many people want in their log files, for
tracking which process wrote the message and on which host it happened
if logging is centralized. What do you guys think, would you want to add
them to log4j?

--
-- Mike

Mike Schilli
[EMAIL PROTECTED]



--
To unsubscribe, e-mail:

For additional commands, e-mail:












---
This message and any included attachments are from Siemens Medical
Solutions 
Health Services Corporation and are intended only for the addressee(s).

The information contained herein may include trade secrets or privileged
or 
otherwise confidential information.  Unauthorized review, forwarding,
printing, 
copying, distributing, or using such information is strictly prohibited
and may 
be unlawful.  If you received this message in error, or have reason to
believe 
you are not authorized to receive it, please promptly delete this
message and 
notify the sender by e-mail with a copy to [EMAIL PROTECTED]  Thank you

--
To unsubscribe, e-mail:

For additional commands, e-mail:



Confidentiality Warning:  This e-mail contains information intended 
only for the use of the individual or entity named above.  If the reader of this 
e-mail is not the intended recipient or the employee or agent responsible for 
delivering it to the intended recipient, any dissemination, publication or copying of 
this e-mail is strictly prohibited. The sender does not accept any responsibility for 
any loss, disruption or damage to your data or computer system that may occur while 
using data contained in, or transmitted with, this e-mail.   If you have received this 
e-mail in error, please immediately notify us by return e-mail.  Thank you.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: %P and %H addition to PatternLayout

2002-11-08 Thread Ceki Gülcü

I have proposed this enhancement some time ago.

http://www.qos.ch/specs/PatternLayout.html



At 10:48 08.11.2002 -0600, you wrote:

Hostname yes. Can't get pid without using native code.

-Original Message-
From: [EMAIL PROTECTED] [mailto:Daniel.Hannum@;smed.com]
Sent: Friday, November 08, 2002 10:04 AM
To: Log4J Users List
Subject: Re: %P and %H addition to PatternLayout



I'd love for this to be addressed. I don't want this message to be
quietly
ignored, so... bump.

These are required in my work. If we don't do this, then I'll have to
hack
it up myself. However, I believe Java doesn't provide a means to get a
pid.
I'm not sure if this is true, but it would throw a wrench in this.

Does anyone know if these can be done? Or if the developers want this to
be
done? Cuz a patch is trivial if Java provides the functions.

dan





Mike Schilli <[EMAIL PROTECTED]> on 11/07/2002 09:34:43 PM

Please respond to "Log4J Users List" <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:

Subject:  %P and %H addition to PatternLayout


Hi folks,

the Log4perl group has been receiving requests on adding %P (current
process id) and %H (hostname) to the PatternLayout format descriptors.
These seem to be features many people want in their log files, for
tracking which process wrote the message and on which host it happened
if logging is centralized. What do you guys think, would you want to add
them to log4j?

--
-- Mike

Mike Schilli
[EMAIL PROTECTED]



--
To unsubscribe, e-mail:

For additional commands, e-mail:












---
This message and any included attachments are from Siemens Medical
Solutions
Health Services Corporation and are intended only for the addressee(s).

The information contained herein may include trade secrets or privileged
or
otherwise confidential information.  Unauthorized review, forwarding,
printing,
copying, distributing, or using such information is strictly prohibited
and may
be unlawful.  If you received this message in error, or have reason to
believe
you are not authorized to receive it, please promptly delete this
message and
notify the sender by e-mail with a copy to [EMAIL PROTECTED]  Thank you

--
To unsubscribe, e-mail:

For additional commands, e-mail:



Confidentiality Warning:  This e-mail contains information 
intended only for the use of the individual or entity named above.  If the 
reader of this e-mail is not the intended recipient or the employee or 
agent responsible for delivering it to the intended recipient, any 
dissemination, publication or copying of this e-mail is strictly 
prohibited. The sender does not accept any responsibility for any loss, 
disruption or damage to your data or computer system that may occur while 
using data contained in, or transmitted with, this e-mail.   If you have 
received this e-mail in error, please immediately notify us by return 
e-mail.  Thank you.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
Ceki

TCP implementations will follow a general principle of robustness: be
conservative in what you do, be liberal in what you accept from
others. -- Jon Postel, RFC 793



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: log4j SocketAppender questions

2002-11-08 Thread Samuel Cheung
should we open a bug report to change that?

-Original Message-
From: Ricardo Moral [mailto:ricardo_moral@;yahoo.com]
Sent: Friday, November 08, 2002 9:32 AM
To: Log4J Users List
Subject: RE: log4j SocketAppender questions


Yes... You r right. It should be protected. You
shouldnt call this method directly this method should
by called only by the Log4j classes.

--- Samuel Cheung <[EMAIL PROTECTED]> wrote:
> Ricardo,
> 
> Yes, the append() method of AppenderEskeleton is
> protected but the append()
> method of SocketAppender() is public. The append()
> method of
> SocketAppender() should be protected as well. Is
> that correct?
> 
> -Original Message-
> From: Ricardo Moral [mailto:ricardo_moral@;yahoo.com]
> Sent: Friday, November 08, 2002 7:05 AM
> To: Log4J Users List
> Subject: RE: log4j SocketAppender questions
> 
> 
> --- Samuel Cheung <[EMAIL PROTECTED]> wrote:
> > Thanks. Then shouldn't append() be protected
> instead
> > of public? So that
> > application can not call append() and call
> > doAppend() instead?
> 
> In the version I have 1.2.7 the append() method of
> AppenderEskeleton is protected. So this is OK.
> 
> > 
> > And do you know the answer of my Network
> > transmittion question? Does every
> > append result in transmitting a packet?
> > 
> 
> No there is no buffer in SocketAppender. The
> LoggingEvent to be logged will be written directly
> to
> a ObjectOutputStream that wrapps the OutputStream of
> the socket. So if you need buffering you can wrapp
> the
> SocketAppender in a Appender that implements
> buffering
> and wrapps this appender. For this you might use
> AsyncAppender.
> 
> > 
> > -Original Message-
> > From: Ricardo Moral
> [mailto:ricardo_moral@;yahoo.com]
> > Sent: Thursday, November 07, 2002 3:04 PM
> > To: Log4J Users List
> > Subject: Re: log4j SocketAppender questions
> > 
> > 
> > No, there is no need to synchronize the log method
> > before calling any logger that uses this appender.
> > 
> > This is because this appender extends the
> > AppenderSkeleton class. The AppenderSkeleton class
> > is
> > the base class for many of the Appenders (Console,
> > JDBC, etc) and implements the
> > doAppend(LoggingEvent) method wich is
> > the
> > method called by the Logger to report
> LoggingEvents.
> > This method is synchronized and calls the
> > append(LoggingEvent) that is an
> > abstract
> > method that must be implemented in subclases... 
> > 
> > 
> > 
> > --- Samuel Cheung <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > > 
> > > Is SocketAppender in log4j thread safe? If I
> have
> > > multiple threads log to
> > > the same SocketAppender, do I need to
> synchronize
> > > that the log method? 
> > > 
> > > And does SocketAppender have any internal
> buffer?
> > > Will every log() call
> > > result in a network transmission? Or
> > SocketAppender
> > > will buffer all the logs
> > > until it reaches certain limit before it sends
> out
> > > the log thru the network
> > > transmission.
> > > 
> > > Thank you for any information.
> > > Sam
> > > 
> > > --
> > > To unsubscribe, e-mail:  
> > >
> 
> > > For additional commands, e-mail:
> > > 
> > > 
> > 
> > 
> > __
> > Do you Yahoo!?
> > U2 on LAUNCH - Exclusive greatest hits videos
> > http://launch.yahoo.com/u2
> > 
> > --
> > To unsubscribe, e-mail:  
> > 
> > For additional commands, e-mail:
> > 
> > 
> > --
> > To unsubscribe, e-mail:  
> > 
> > For additional commands, e-mail:
> > 
> > 
> 
> 
> __
> Do you Yahoo!?
> U2 on LAUNCH - Exclusive greatest hits videos
> http://launch.yahoo.com/u2
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




How to configure SMTPAppender?

2002-11-08 Thread louis
Hello,

I want to configure SMTPAppender in my log4j.xml file, and anyone tell
me what is the syntax (tag)? I can't find any document talking about the
log4j xml structure.

Regards,
Louis



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How to configure SMTPAppender?

2002-11-08 Thread Sara Prigge
This is how I use it in my xml:














Hope that helps you!

-Original Message-
From: louis [mailto:louis@;allsofts.com]
Sent: Friday, November 08, 2002 11:30 AM
To: Log4J Users List
Subject: How to configure SMTPAppender?


Hello,

I want to configure SMTPAppender in my log4j.xml file, and anyone tell
me what is the syntax (tag)? I can't find any document talking about the
log4j xml structure.

Regards,
Louis



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How to configure SMTPAppender?

2002-11-08 Thread Adams, Dick W [PCS]

Does the e-mail then happen automatically, or does one have to extend
SMTPAppender?

-Original Message-
From: Sara Prigge [mailto:sprigge@;LTCG.com] 
Sent: Friday, November 08, 2002 11:32 AM
To: 'Log4J Users List'
Subject: RE: How to configure SMTPAppender?


This is how I use it in my xml:














Hope that helps you!

-Original Message-
From: louis [mailto:louis@;allsofts.com]
Sent: Friday, November 08, 2002 11:30 AM
To: Log4J Users List
Subject: How to configure SMTPAppender?


Hello,

I want to configure SMTPAppender in my log4j.xml file, and anyone tell
me what is the syntax (tag)? I can't find any document talking about the
log4j xml structure.

Regards,
Louis



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How to configure SMTPAppender?

2002-11-08 Thread Sara Prigge
The way I use it, it happens automatically when I log something at the ERROR
level or above.

-Original Message-
From: Adams, Dick W [PCS] [mailto:DAdams07@;sprintspectrum.com]
Sent: Friday, November 08, 2002 11:35 AM
To: 'Log4J Users List'
Subject: RE: How to configure SMTPAppender?



Does the e-mail then happen automatically, or does one have to extend
SMTPAppender?

-Original Message-
From: Sara Prigge [mailto:sprigge@;LTCG.com] 
Sent: Friday, November 08, 2002 11:32 AM
To: 'Log4J Users List'
Subject: RE: How to configure SMTPAppender?


This is how I use it in my xml:














Hope that helps you!

-Original Message-
From: louis [mailto:louis@;allsofts.com]
Sent: Friday, November 08, 2002 11:30 AM
To: Log4J Users List
Subject: How to configure SMTPAppender?


Hello,

I want to configure SMTPAppender in my log4j.xml file, and anyone tell
me what is the syntax (tag)? I can't find any document talking about the
log4j xml structure.

Regards,
Louis



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How to configure SMTPAppender?

2002-11-08 Thread Shapira, Yoav
Howdy,
The email happens "automatically" ;)  What is the point of SMTPAppender
otherwise?  It hides all the javax.mail details from you.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Adams, Dick W [PCS] [mailto:DAdams07@;sprintspectrum.com]
>Sent: Friday, November 08, 2002 12:35 PM
>To: 'Log4J Users List'
>Subject: RE: How to configure SMTPAppender?
>
>
>Does the e-mail then happen automatically, or does one have to extend
>SMTPAppender?
>
>-Original Message-
>From: Sara Prigge [mailto:sprigge@;LTCG.com]
>Sent: Friday, November 08, 2002 11:32 AM
>To: 'Log4J Users List'
>Subject: RE: How to configure SMTPAppender?
>
>
>This is how I use it in my xml:
>
>
>   
>   
>   
>   
>   
>   
>
>   
>   
>   
>
>
>Hope that helps you!
>
>-Original Message-
>From: louis [mailto:louis@;allsofts.com]
>Sent: Friday, November 08, 2002 11:30 AM
>To: Log4J Users List
>Subject: How to configure SMTPAppender?
>
>
>Hello,
>
>I want to configure SMTPAppender in my log4j.xml file, and anyone
tell
>me what is the syntax (tag)? I can't find any document talking about
the
>log4j xml structure.
>
>Regards,
>Louis
>
>
>
>--
>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]>
>
>--
>To unsubscribe, e-mail:   [EMAIL PROTECTED]>
>For additional commands, e-mail: [EMAIL PROTECTED]>


This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Re: How to configure SMTPAppender?

2002-11-08 Thread louis
Thanks Sara, I try set the Threshold to DEBUG for testing, but I don't know
I still can't receive any email.

regards,
Louis
- Original Message -
From: "Sara Prigge" <[EMAIL PROTECTED]>
To: "'Log4J Users List'" <[EMAIL PROTECTED]>
Sent: Friday, November 08, 2002 5:37 PM
Subject: RE: How to configure SMTPAppender?


> The way I use it, it happens automatically when I log something at the
ERROR
> level or above.
>
> -Original Message-
> From: Adams, Dick W [PCS] [mailto:DAdams07@;sprintspectrum.com]
> Sent: Friday, November 08, 2002 11:35 AM
> To: 'Log4J Users List'
> Subject: RE: How to configure SMTPAppender?
>
>
>
> Does the e-mail then happen automatically, or does one have to extend
> SMTPAppender?
>
> -Original Message-
> From: Sara Prigge [mailto:sprigge@;LTCG.com]
> Sent: Friday, November 08, 2002 11:32 AM
> To: 'Log4J Users List'
> Subject: RE: How to configure SMTPAppender?
>
>
> This is how I use it in my xml:
>
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
>
> Hope that helps you!
>
> -Original Message-
> From: louis [mailto:louis@;allsofts.com]
> Sent: Friday, November 08, 2002 11:30 AM
> To: Log4J Users List
> Subject: How to configure SMTPAppender?
>
>
> Hello,
>
> I want to configure SMTPAppender in my log4j.xml file, and anyone tell
> me what is the syntax (tag)? I can't find any document talking about the
> log4j xml structure.
>
> Regards,
> Louis
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How to configure SMTPAppender?

2002-11-08 Thread Shapira, Yoav
Hi,
Do you get any error messages anywhere?  Do you see the messages you're
trying to email on other appenders, e.g. a file somewhere?

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: louis [mailto:louis@;allsofts.com]
>Sent: Friday, November 08, 2002 12:46 PM
>To: Log4J Users List
>Subject: Re: How to configure SMTPAppender?
>
>Thanks Sara, I try set the Threshold to DEBUG for testing, but I don't
know
>I still can't receive any email.
>
>regards,
>Louis
>- Original Message -
>From: "Sara Prigge" <[EMAIL PROTECTED]>
>To: "'Log4J Users List'" <[EMAIL PROTECTED]>
>Sent: Friday, November 08, 2002 5:37 PM
>Subject: RE: How to configure SMTPAppender?
>
>
>> The way I use it, it happens automatically when I log something at
the
>ERROR
>> level or above.
>>
>> -Original Message-
>> From: Adams, Dick W [PCS] [mailto:DAdams07@;sprintspectrum.com]
>> Sent: Friday, November 08, 2002 11:35 AM
>> To: 'Log4J Users List'
>> Subject: RE: How to configure SMTPAppender?
>>
>>
>>
>> Does the e-mail then happen automatically, or does one have to extend
>> SMTPAppender?
>>
>> -Original Message-
>> From: Sara Prigge [mailto:sprigge@;LTCG.com]
>> Sent: Friday, November 08, 2002 11:32 AM
>> To: 'Log4J Users List'
>> Subject: RE: How to configure SMTPAppender?
>>
>>
>> This is how I use it in my xml:
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> 
>>
>> Hope that helps you!
>>
>> -Original Message-
>> From: louis [mailto:louis@;allsofts.com]
>> Sent: Friday, November 08, 2002 11:30 AM
>> To: Log4J Users List
>> Subject: How to configure SMTPAppender?
>>
>>
>> Hello,
>>
>> I want to configure SMTPAppender in my log4j.xml file, and anyone
>tell
>> me what is the syntax (tag)? I can't find any document talking about
the
>> log4j xml structure.
>>
>> Regards,
>> Louis
>>
>>
>>
>> --
>> To unsubscribe, e-mail:
>
>> For additional commands, e-mail:
>
>>
>> --
>> To unsubscribe, e-mail:
>
>> For additional commands, e-mail:
>
>>
>> --
>> To unsubscribe, e-mail:
>
>> For additional commands, e-mail:
>
>>
>> --
>> To unsubscribe, e-mail:
>
>> For additional commands, e-mail:
>
>>
>
>
>
>--
>To unsubscribe, e-mail:   [EMAIL PROTECTED]>
>For additional commands, e-mail: [EMAIL PROTECTED]>


This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Re: How to configure SMTPAppender?

2002-11-08 Thread louis
Hi,

No, I didn't c any error msg, and I only use one appender, not other
appender in my config file except SMTPAppender.

Regards,
Louis
- Original Message -
From: "Shapira, Yoav" <[EMAIL PROTECTED]>
To: "Log4J Users List" <[EMAIL PROTECTED]>
Sent: Friday, November 08, 2002 5:54 PM
Subject: RE: How to configure SMTPAppender?


Hi,
Do you get any error messages anywhere?  Do you see the messages you're
trying to email on other appenders, e.g. a file somewhere?

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: louis [mailto:louis@;allsofts.com]
>Sent: Friday, November 08, 2002 12:46 PM
>To: Log4J Users List
>Subject: Re: How to configure SMTPAppender?
>
>Thanks Sara, I try set the Threshold to DEBUG for testing, but I don't
know
>I still can't receive any email.
>
>regards,
>Louis
>- Original Message -
>From: "Sara Prigge" <[EMAIL PROTECTED]>
>To: "'Log4J Users List'" <[EMAIL PROTECTED]>
>Sent: Friday, November 08, 2002 5:37 PM
>Subject: RE: How to configure SMTPAppender?
>
>
>> The way I use it, it happens automatically when I log something at
the
>ERROR
>> level or above.
>>
>> -Original Message-
>> From: Adams, Dick W [PCS] [mailto:DAdams07@;sprintspectrum.com]
>> Sent: Friday, November 08, 2002 11:35 AM
>> To: 'Log4J Users List'
>> Subject: RE: How to configure SMTPAppender?
>>
>>
>>
>> Does the e-mail then happen automatically, or does one have to extend
>> SMTPAppender?
>>
>> -Original Message-
>> From: Sara Prigge [mailto:sprigge@;LTCG.com]
>> Sent: Friday, November 08, 2002 11:32 AM
>> To: 'Log4J Users List'
>> Subject: RE: How to configure SMTPAppender?
>>
>>
>> This is how I use it in my xml:
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> 
>>
>> Hope that helps you!
>>
>> -Original Message-
>> From: louis [mailto:louis@;allsofts.com]
>> Sent: Friday, November 08, 2002 11:30 AM
>> To: Log4J Users List
>> Subject: How to configure SMTPAppender?
>>
>>
>> Hello,
>>
>> I want to configure SMTPAppender in my log4j.xml file, and anyone
>tell
>> me what is the syntax (tag)? I can't find any document talking about
the
>> log4j xml structure.
>>
>> Regards,
>> Louis
>>
>>
>>
>> --
>> To unsubscribe, e-mail:
>
>> For additional commands, e-mail:
>
>>
>> --
>> To unsubscribe, e-mail:
>
>> For additional commands, e-mail:
>
>>
>> --
>> To unsubscribe, e-mail:
>
>> For additional commands, e-mail:
>
>>
>> --
>> To unsubscribe, e-mail:
>
>> For additional commands, e-mail:
>
>>
>
>
>
>--
>To unsubscribe, e-mail:   [EMAIL PROTECTED]>
>For additional commands, e-mail: [EMAIL PROTECTED]>








> This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.
>
>






> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: How to configure SMTPAppender?

2002-11-08 Thread Ricardo Moral
SMTPAppender will store all the logging events on an
internal cache and it will send all the messages when
the TriggeringEventEvaluator you set with the
setEvaluatorMethod or the constructor parameter return
true.

By default the evaluator is set with an instance of
DefaultEvaluator wich is a package-private class
defined in the same compilation unit of SMTPAppender.
This evaluator will return true only when the logging
event has a priority greater or equal than ERROR.

--- louis <[EMAIL PROTECTED]> wrote:
> Thanks Sara, I try set the Threshold to DEBUG for
> testing, but I don't know
> I still can't receive any email.
> 
> regards,
> Louis
> - Original Message -
> From: "Sara Prigge" <[EMAIL PROTECTED]>
> To: "'Log4J Users List'"
> <[EMAIL PROTECTED]>
> Sent: Friday, November 08, 2002 5:37 PM
> Subject: RE: How to configure SMTPAppender?
> 
> 
> > The way I use it, it happens automatically when I
> log something at the
> ERROR
> > level or above.
> >
> > -Original Message-
> > From: Adams, Dick W [PCS]
> [mailto:DAdams07@;sprintspectrum.com]
> > Sent: Friday, November 08, 2002 11:35 AM
> > To: 'Log4J Users List'
> > Subject: RE: How to configure SMTPAppender?
> >
> >
> >
> > Does the e-mail then happen automatically, or does
> one have to extend
> > SMTPAppender?
> >
> > -Original Message-
> > From: Sara Prigge [mailto:sprigge@;LTCG.com]
> > Sent: Friday, November 08, 2002 11:32 AM
> > To: 'Log4J Users List'
> > Subject: RE: How to configure SMTPAppender?
> >
> >
> > This is how I use it in my xml:
> >
> >  class="org.apache.log4j.net.SMTPAppender">
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > 
> >  value="%d{ABSOLUTE}
> > (%F:%L) - %m%n"/>
> > 
> > 
> >
> > Hope that helps you!
> >
> > -Original Message-
> > From: louis [mailto:louis@;allsofts.com]
> > Sent: Friday, November 08, 2002 11:30 AM
> > To: Log4J Users List
> > Subject: How to configure SMTPAppender?
> >
> >
> > Hello,
> >
> > I want to configure SMTPAppender in my
> log4j.xml file, and anyone tell
> > me what is the syntax (tag)? I can't find any
> document talking about the
> > log4j xml structure.
> >
> > Regards,
> > Louis
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How to configure SMTPAppender?

2002-11-08 Thread Sara Prigge
How are you initializing log4j? Is it possible that it hasn't been
initialized?  I'd suggest creating another appender that just writes to a
file and see if you can get that to work.  That will determine whether or
not log4j is even being used or is initialized properly. 

-Original Message-
From: louis [mailto:louis@;allsofts.com]
Sent: Friday, November 08, 2002 11:59 AM
To: Log4J Users List
Subject: Re: How to configure SMTPAppender?


Hi,

No, I didn't c any error msg, and I only use one appender, not other
appender in my config file except SMTPAppender.

Regards,
Louis
- Original Message -
From: "Shapira, Yoav" <[EMAIL PROTECTED]>
To: "Log4J Users List" <[EMAIL PROTECTED]>
Sent: Friday, November 08, 2002 5:54 PM
Subject: RE: How to configure SMTPAppender?


Hi,
Do you get any error messages anywhere?  Do you see the messages you're
trying to email on other appenders, e.g. a file somewhere?

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: louis [mailto:louis@;allsofts.com]
>Sent: Friday, November 08, 2002 12:46 PM
>To: Log4J Users List
>Subject: Re: How to configure SMTPAppender?
>
>Thanks Sara, I try set the Threshold to DEBUG for testing, but I don't
know
>I still can't receive any email.
>
>regards,
>Louis
>- Original Message -
>From: "Sara Prigge" <[EMAIL PROTECTED]>
>To: "'Log4J Users List'" <[EMAIL PROTECTED]>
>Sent: Friday, November 08, 2002 5:37 PM
>Subject: RE: How to configure SMTPAppender?
>
>
>> The way I use it, it happens automatically when I log something at
the
>ERROR
>> level or above.
>>
>> -Original Message-
>> From: Adams, Dick W [PCS] [mailto:DAdams07@;sprintspectrum.com]
>> Sent: Friday, November 08, 2002 11:35 AM
>> To: 'Log4J Users List'
>> Subject: RE: How to configure SMTPAppender?
>>
>>
>>
>> Does the e-mail then happen automatically, or does one have to extend
>> SMTPAppender?
>>
>> -Original Message-
>> From: Sara Prigge [mailto:sprigge@;LTCG.com]
>> Sent: Friday, November 08, 2002 11:32 AM
>> To: 'Log4J Users List'
>> Subject: RE: How to configure SMTPAppender?
>>
>>
>> This is how I use it in my xml:
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> 
>>
>> Hope that helps you!
>>
>> -Original Message-
>> From: louis [mailto:louis@;allsofts.com]
>> Sent: Friday, November 08, 2002 11:30 AM
>> To: Log4J Users List
>> Subject: How to configure SMTPAppender?
>>
>>
>> Hello,
>>
>> I want to configure SMTPAppender in my log4j.xml file, and anyone
>tell
>> me what is the syntax (tag)? I can't find any document talking about
the
>> log4j xml structure.
>>
>> Regards,
>> Louis
>>
>>
>>
>> --
>> To unsubscribe, e-mail:
>
>> For additional commands, e-mail:
>
>>
>> --
>> To unsubscribe, e-mail:
>
>> For additional commands, e-mail:
>
>>
>> --
>> To unsubscribe, e-mail:
>
>> For additional commands, e-mail:
>
>>
>> --
>> To unsubscribe, e-mail:
>
>> For additional commands, e-mail:
>
>>
>
>
>
>--
>To unsubscribe, e-mail:   [EMAIL PROTECTED]>
>For additional commands, e-mail: [EMAIL PROTECTED]>








> This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.
>
>






> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: log4j SocketAppender questions

2002-11-08 Thread Ricardo Moral
Im not sure... The other appenders included with Log4J
(JDBCAppender, AsyncAppender, SocketAppender,
WriterAppender, etc) also have this method declared as
public... Maybe there is a reason for this. If you
want you can post this problem on the dev list and see
that the developers think.



--- Samuel Cheung <[EMAIL PROTECTED]> wrote:
> should we open a bug report to change that?
> 
> -Original Message-
> From: Ricardo Moral [mailto:ricardo_moral@;yahoo.com]
> Sent: Friday, November 08, 2002 9:32 AM
> To: Log4J Users List
> Subject: RE: log4j SocketAppender questions
> 
> 
> Yes... You r right. It should be protected. You
> shouldnt call this method directly this method
> should
> by called only by the Log4j classes.
> 
> --- Samuel Cheung <[EMAIL PROTECTED]> wrote:
> > Ricardo,
> > 
> > Yes, the append() method of AppenderEskeleton is
> > protected but the append()
> > method of SocketAppender() is public. The append()
> > method of
> > SocketAppender() should be protected as well. Is
> > that correct?
> > 
> > -Original Message-
> > From: Ricardo Moral
> [mailto:ricardo_moral@;yahoo.com]
> > Sent: Friday, November 08, 2002 7:05 AM
> > To: Log4J Users List
> > Subject: RE: log4j SocketAppender questions
> > 
> > 
> > --- Samuel Cheung <[EMAIL PROTECTED]> wrote:
> > > Thanks. Then shouldn't append() be protected
> > instead
> > > of public? So that
> > > application can not call append() and call
> > > doAppend() instead?
> > 
> > In the version I have 1.2.7 the append() method of
> > AppenderEskeleton is protected. So this is OK.
> > 
> > > 
> > > And do you know the answer of my Network
> > > transmittion question? Does every
> > > append result in transmitting a packet?
> > > 
> > 
> > No there is no buffer in SocketAppender. The
> > LoggingEvent to be logged will be written directly
> > to
> > a ObjectOutputStream that wrapps the OutputStream
> of
> > the socket. So if you need buffering you can wrapp
> > the
> > SocketAppender in a Appender that implements
> > buffering
> > and wrapps this appender. For this you might use
> > AsyncAppender.
> > 
> > > 
> > > -Original Message-
> > > From: Ricardo Moral
> > [mailto:ricardo_moral@;yahoo.com]
> > > Sent: Thursday, November 07, 2002 3:04 PM
> > > To: Log4J Users List
> > > Subject: Re: log4j SocketAppender questions
> > > 
> > > 
> > > No, there is no need to synchronize the log
> method
> > > before calling any logger that uses this
> appender.
> > > 
> > > This is because this appender extends the
> > > AppenderSkeleton class. The AppenderSkeleton
> class
> > > is
> > > the base class for many of the Appenders
> (Console,
> > > JDBC, etc) and implements the
> > > doAppend(LoggingEvent) method wich
> is
> > > the
> > > method called by the Logger to report
> > LoggingEvents.
> > > This method is synchronized and calls the
> > > append(LoggingEvent) that is an
> > > abstract
> > > method that must be implemented in subclases... 
> > > 
> > > 
> > > 
> > > --- Samuel Cheung <[EMAIL PROTECTED]> wrote:
> > > > Hi,
> > > > 
> > > > Is SocketAppender in log4j thread safe? If I
> > have
> > > > multiple threads log to
> > > > the same SocketAppender, do I need to
> > synchronize
> > > > that the log method? 
> > > > 
> > > > And does SocketAppender have any internal
> > buffer?
> > > > Will every log() call
> > > > result in a network transmission? Or
> > > SocketAppender
> > > > will buffer all the logs
> > > > until it reaches certain limit before it sends
> > out
> > > > the log thru the network
> > > > transmission.
> > > > 
> > > > Thank you for any information.
> > > > Sam
> > > > 
> > > > --
> > > > To unsubscribe, e-mail:  
> > > >
> > 
> > > > For additional commands, e-mail:
> > > > 
> > > > 
> > > 
> > > 
> > >
> __
> > > Do you Yahoo!?
> > > U2 on LAUNCH - Exclusive greatest hits videos
> > > http://launch.yahoo.com/u2
> > > 
> > > --
> > > To unsubscribe, e-mail:  
> > >
> 
> > > For additional commands, e-mail:
> > > 
> > > 
> > > --
> > > To unsubscribe, e-mail:  
> > >
> 
> > > For additional commands, e-mail:
> > > 
> > > 
> > 
> > 
> > __
> > Do you Yahoo!?
> > U2 on LAUNCH - Exclusive greatest hits videos
> > http://launch.yahoo.com/u2
> > 
> > --
> > To unsubscribe, e-mail:  
> > 
> > For additional commands, e-mail:
> > 
> > 
> > --
> > To unsubscribe, e-mail:  
> > 
> > For additional commands, e-mail:
> > 
> > 
> 
> 
> 

Re: How to configure SMTPAppender?

2002-11-08 Thread louis
Hi,

So, do you mean if I using default setting, and use logger.warn it should
able to send me a mail, but I just try it, I still can't get the mail.
Anywhere I did wrong?

Louis
- Original Message -
From: "Ricardo Moral" <[EMAIL PROTECTED]>
To: "Log4J Users List" <[EMAIL PROTECTED]>
Sent: Friday, November 08, 2002 5:59 PM
Subject: Re: How to configure SMTPAppender?


> SMTPAppender will store all the logging events on an
> internal cache and it will send all the messages when
> the TriggeringEventEvaluator you set with the
> setEvaluatorMethod or the constructor parameter return
> true.
>
> By default the evaluator is set with an instance of
> DefaultEvaluator wich is a package-private class
> defined in the same compilation unit of SMTPAppender.
> This evaluator will return true only when the logging
> event has a priority greater or equal than ERROR.
>
> --- louis <[EMAIL PROTECTED]> wrote:
> > Thanks Sara, I try set the Threshold to DEBUG for
> > testing, but I don't know
> > I still can't receive any email.
> >
> > regards,
> > Louis
> > - Original Message -
> > From: "Sara Prigge" <[EMAIL PROTECTED]>
> > To: "'Log4J Users List'"
> > <[EMAIL PROTECTED]>
> > Sent: Friday, November 08, 2002 5:37 PM
> > Subject: RE: How to configure SMTPAppender?
> >
> >
> > > The way I use it, it happens automatically when I
> > log something at the
> > ERROR
> > > level or above.
> > >
> > > -Original Message-
> > > From: Adams, Dick W [PCS]
> > [mailto:DAdams07@;sprintspectrum.com]
> > > Sent: Friday, November 08, 2002 11:35 AM
> > > To: 'Log4J Users List'
> > > Subject: RE: How to configure SMTPAppender?
> > >
> > >
> > >
> > > Does the e-mail then happen automatically, or does
> > one have to extend
> > > SMTPAppender?
> > >
> > > -Original Message-
> > > From: Sara Prigge [mailto:sprigge@;LTCG.com]
> > > Sent: Friday, November 08, 2002 11:32 AM
> > > To: 'Log4J Users List'
> > > Subject: RE: How to configure SMTPAppender?
> > >
> > >
> > > This is how I use it in my xml:
> > >
> > >  > class="org.apache.log4j.net.SMTPAppender">
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > 
> > >  > value="%d{ABSOLUTE}
> > > (%F:%L) - %m%n"/>
> > > 
> > > 
> > >
> > > Hope that helps you!
> > >
> > > -Original Message-
> > > From: louis [mailto:louis@;allsofts.com]
> > > Sent: Friday, November 08, 2002 11:30 AM
> > > To: Log4J Users List
> > > Subject: How to configure SMTPAppender?
> > >
> > >
> > > Hello,
> > >
> > > I want to configure SMTPAppender in my
> > log4j.xml file, and anyone tell
> > > me what is the syntax (tag)? I can't find any
> > document talking about the
> > > log4j xml structure.
> > >
> > > Regards,
> > > Louis
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > 
> > > For additional commands, e-mail:
> > 
> > >
> > > --
> > > To unsubscribe, e-mail:
> > 
> > > For additional commands, e-mail:
> > 
> > >
> > > --
> > > To unsubscribe, e-mail:
> > 
> > > For additional commands, e-mail:
> > 
> > >
> > > --
> > > To unsubscribe, e-mail:
> > 
> > > For additional commands, e-mail:
> > 
> > >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
>
>
> __
> Do you Yahoo!?
> U2 on LAUNCH - Exclusive greatest hits videos
> http://launch.yahoo.com/u2
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: How to configure SMTPAppender?

2002-11-08 Thread louis
Yes, I did the initialized, it work in FileAppender and
DailyRollingFileAppender as well.

Louis
- Original Message -
From: "Sara Prigge" <[EMAIL PROTECTED]>
To: "'Log4J Users List'" <[EMAIL PROTECTED]>
Sent: Friday, November 08, 2002 6:00 PM
Subject: RE: How to configure SMTPAppender?


> How are you initializing log4j? Is it possible that it hasn't been
> initialized?  I'd suggest creating another appender that just writes to a
> file and see if you can get that to work.  That will determine whether or
> not log4j is even being used or is initialized properly.
>
> -Original Message-
> From: louis [mailto:louis@;allsofts.com]
> Sent: Friday, November 08, 2002 11:59 AM
> To: Log4J Users List
> Subject: Re: How to configure SMTPAppender?
>
>
> Hi,
>
> No, I didn't c any error msg, and I only use one appender, not other
> appender in my config file except SMTPAppender.
>
> Regards,
> Louis
> - Original Message -
> From: "Shapira, Yoav" <[EMAIL PROTECTED]>
> To: "Log4J Users List" <[EMAIL PROTECTED]>
> Sent: Friday, November 08, 2002 5:54 PM
> Subject: RE: How to configure SMTPAppender?
>
>
> Hi,
> Do you get any error messages anywhere?  Do you see the messages you're
> trying to email on other appenders, e.g. a file somewhere?
>
> Yoav Shapira
> Millennium ChemInformatics
>
>
> >-Original Message-
> >From: louis [mailto:louis@;allsofts.com]
> >Sent: Friday, November 08, 2002 12:46 PM
> >To: Log4J Users List
> >Subject: Re: How to configure SMTPAppender?
> >
> >Thanks Sara, I try set the Threshold to DEBUG for testing, but I don't
> know
> >I still can't receive any email.
> >
> >regards,
> >Louis
> >- Original Message -
> >From: "Sara Prigge" <[EMAIL PROTECTED]>
> >To: "'Log4J Users List'" <[EMAIL PROTECTED]>
> >Sent: Friday, November 08, 2002 5:37 PM
> >Subject: RE: How to configure SMTPAppender?
> >
> >
> >> The way I use it, it happens automatically when I log something at
> the
> >ERROR
> >> level or above.
> >>
> >> -Original Message-
> >> From: Adams, Dick W [PCS] [mailto:DAdams07@;sprintspectrum.com]
> >> Sent: Friday, November 08, 2002 11:35 AM
> >> To: 'Log4J Users List'
> >> Subject: RE: How to configure SMTPAppender?
> >>
> >>
> >>
> >> Does the e-mail then happen automatically, or does one have to extend
> >> SMTPAppender?
> >>
> >> -Original Message-
> >> From: Sara Prigge [mailto:sprigge@;LTCG.com]
> >> Sent: Friday, November 08, 2002 11:32 AM
> >> To: 'Log4J Users List'
> >> Subject: RE: How to configure SMTPAppender?
> >>
> >>
> >> This is how I use it in my xml:
> >>
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >>
> >> 
> >> 
> >> 
> >> 
> >>
> >> Hope that helps you!
> >>
> >> -Original Message-
> >> From: louis [mailto:louis@;allsofts.com]
> >> Sent: Friday, November 08, 2002 11:30 AM
> >> To: Log4J Users List
> >> Subject: How to configure SMTPAppender?
> >>
> >>
> >> Hello,
> >>
> >> I want to configure SMTPAppender in my log4j.xml file, and anyone
> >tell
> >> me what is the syntax (tag)? I can't find any document talking about
> the
> >> log4j xml structure.
> >>
> >> Regards,
> >> Louis
> >>
> >>
> >>
> >> --
> >> To unsubscribe, e-mail:
> >
> >> For additional commands, e-mail:
> >
> >>
> >> --
> >> To unsubscribe, e-mail:
> >
> >> For additional commands, e-mail:
> >
> >>
> >> --
> >> To unsubscribe, e-mail:
> >
> >> For additional commands, e-mail:
> >
> >>
> >> --
> >> To unsubscribe, e-mail:
> >
> >> For additional commands, e-mail:
> >
> >>
> >
> >
> >
> >--
> >To unsubscribe, e-mail:    >[EMAIL PROTECTED]>
> >For additional commands, e-mail:  >[EMAIL PROTECTED]>
>
>
>
>
> --
--
> 
>
>
> > This e-mail, including any attachments, is a confidential business
> communication, and may contain information that is confidential,
proprietary
> and/or privileged.  This e-mail is intended only for the individual(s) to
> whom it is addressed, and may not be saved, copied, printed, disclosed or
> used by anyone else.  If you are not the(an) intended recipient, please
> immediately delete this e-mail from your computer system and notify the
> sender.  Thank you.
> >
> >
>
>
> --
--
> 
>
>
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
>
>
>
> --
> To unsubscribe, e-mail:

> For additional 

Re: How to configure SMTPAppender?

2002-11-08 Thread Ricardo Moral
No this means that you must send a logging event with
a ERROR or FATAL level.

--- louis <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> So, do you mean if I using default setting, and use
> logger.warn it should
> able to send me a mail, but I just try it, I still
> can't get the mail.
> Anywhere I did wrong?
> 
> Louis
> - Original Message -
> From: "Ricardo Moral" <[EMAIL PROTECTED]>
> To: "Log4J Users List"
> <[EMAIL PROTECTED]>
> Sent: Friday, November 08, 2002 5:59 PM
> Subject: Re: How to configure SMTPAppender?
> 
> 
> > SMTPAppender will store all the logging events on
> an
> > internal cache and it will send all the messages
> when
> > the TriggeringEventEvaluator you set with the
> > setEvaluatorMethod or the constructor parameter
> return
> > true.
> >
> > By default the evaluator is set with an instance
> of
> > DefaultEvaluator wich is a package-private class
> > defined in the same compilation unit of
> SMTPAppender.
> > This evaluator will return true only when the
> logging
> > event has a priority greater or equal than ERROR.
> >
> > --- louis <[EMAIL PROTECTED]> wrote:
> > > Thanks Sara, I try set the Threshold to DEBUG
> for
> > > testing, but I don't know
> > > I still can't receive any email.
> > >
> > > regards,
> > > Louis
> > > - Original Message -
> > > From: "Sara Prigge" <[EMAIL PROTECTED]>
> > > To: "'Log4J Users List'"
> > > <[EMAIL PROTECTED]>
> > > Sent: Friday, November 08, 2002 5:37 PM
> > > Subject: RE: How to configure SMTPAppender?
> > >
> > >
> > > > The way I use it, it happens automatically
> when I
> > > log something at the
> > > ERROR
> > > > level or above.
> > > >
> > > > -Original Message-
> > > > From: Adams, Dick W [PCS]
> > > [mailto:DAdams07@;sprintspectrum.com]
> > > > Sent: Friday, November 08, 2002 11:35 AM
> > > > To: 'Log4J Users List'
> > > > Subject: RE: How to configure SMTPAppender?
> > > >
> > > >
> > > >
> > > > Does the e-mail then happen automatically, or
> does
> > > one have to extend
> > > > SMTPAppender?
> > > >
> > > > -Original Message-
> > > > From: Sara Prigge [mailto:sprigge@;LTCG.com]
> > > > Sent: Friday, November 08, 2002 11:32 AM
> > > > To: 'Log4J Users List'
> > > > Subject: RE: How to configure SMTPAppender?
> > > >
> > > >
> > > > This is how I use it in my xml:
> > > >
> > > >  > > class="org.apache.log4j.net.SMTPAppender">
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> > > >  class="org.apache.log4j.PatternLayout">
> > > >  > > value="%d{ABSOLUTE}
> > > > (%F:%L) - %m%n"/>
> > > > 
> > > > 
> > > >
> > > > Hope that helps you!
> > > >
> > > > -Original Message-
> > > > From: louis [mailto:louis@;allsofts.com]
> > > > Sent: Friday, November 08, 2002 11:30 AM
> > > > To: Log4J Users List
> > > > Subject: How to configure SMTPAppender?
> > > >
> > > >
> > > > Hello,
> > > >
> > > > I want to configure SMTPAppender in my
> > > log4j.xml file, and anyone tell
> > > > me what is the syntax (tag)? I can't find any
> > > document talking about the
> > > > log4j xml structure.
> > > >
> > > > Regards,
> > > > Louis
> > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > >
> 
> > > > For additional commands, e-mail:
> > > 
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > >
> 
> > > > For additional commands, e-mail:
> > > 
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > >
> 
> > > > For additional commands, e-mail:
> > > 
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > >
> 
> > > > For additional commands, e-mail:
> > > 
> > > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > >
> 
> > > For additional commands, e-mail:
> > > 
> > >
> >
> >
> > __
> > Do you Yahoo!?
> > U2 on LAUNCH - Exclusive greatest hits videos
> > http://launch.yahoo.com/u2
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: How to configure SMTPAppender?

2002-11-08 Thread louis
GOT IT! Thank you very much to all of you!

- Original Message -
From: "Ricardo Moral" <[EMAIL PROTECTED]>
To: "Log4J Users List" <[EMAIL PROTECTED]>
Sent: Friday, November 08, 2002 6:21 PM
Subject: Re: How to configure SMTPAppender?


> No this means that you must send a logging event with
> a ERROR or FATAL level.
>
> --- louis <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > So, do you mean if I using default setting, and use
> > logger.warn it should
> > able to send me a mail, but I just try it, I still
> > can't get the mail.
> > Anywhere I did wrong?
> >
> > Louis
> > - Original Message -
> > From: "Ricardo Moral" <[EMAIL PROTECTED]>
> > To: "Log4J Users List"
> > <[EMAIL PROTECTED]>
> > Sent: Friday, November 08, 2002 5:59 PM
> > Subject: Re: How to configure SMTPAppender?
> >
> >
> > > SMTPAppender will store all the logging events on
> > an
> > > internal cache and it will send all the messages
> > when
> > > the TriggeringEventEvaluator you set with the
> > > setEvaluatorMethod or the constructor parameter
> > return
> > > true.
> > >
> > > By default the evaluator is set with an instance
> > of
> > > DefaultEvaluator wich is a package-private class
> > > defined in the same compilation unit of
> > SMTPAppender.
> > > This evaluator will return true only when the
> > logging
> > > event has a priority greater or equal than ERROR.
> > >
> > > --- louis <[EMAIL PROTECTED]> wrote:
> > > > Thanks Sara, I try set the Threshold to DEBUG
> > for
> > > > testing, but I don't know
> > > > I still can't receive any email.
> > > >
> > > > regards,
> > > > Louis
> > > > - Original Message -
> > > > From: "Sara Prigge" <[EMAIL PROTECTED]>
> > > > To: "'Log4J Users List'"
> > > > <[EMAIL PROTECTED]>
> > > > Sent: Friday, November 08, 2002 5:37 PM
> > > > Subject: RE: How to configure SMTPAppender?
> > > >
> > > >
> > > > > The way I use it, it happens automatically
> > when I
> > > > log something at the
> > > > ERROR
> > > > > level or above.
> > > > >
> > > > > -Original Message-
> > > > > From: Adams, Dick W [PCS]
> > > > [mailto:DAdams07@;sprintspectrum.com]
> > > > > Sent: Friday, November 08, 2002 11:35 AM
> > > > > To: 'Log4J Users List'
> > > > > Subject: RE: How to configure SMTPAppender?
> > > > >
> > > > >
> > > > >
> > > > > Does the e-mail then happen automatically, or
> > does
> > > > one have to extend
> > > > > SMTPAppender?
> > > > >
> > > > > -Original Message-
> > > > > From: Sara Prigge [mailto:sprigge@;LTCG.com]
> > > > > Sent: Friday, November 08, 2002 11:32 AM
> > > > > To: 'Log4J Users List'
> > > > > Subject: RE: How to configure SMTPAppender?
> > > > >
> > > > >
> > > > > This is how I use it in my xml:
> > > > >
> > > > >  > > > class="org.apache.log4j.net.SMTPAppender">
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >
> > > > >  > class="org.apache.log4j.PatternLayout">
> > > > >  > > > value="%d{ABSOLUTE}
> > > > > (%F:%L) - %m%n"/>
> > > > > 
> > > > > 
> > > > >
> > > > > Hope that helps you!
> > > > >
> > > > > -Original Message-
> > > > > From: louis [mailto:louis@;allsofts.com]
> > > > > Sent: Friday, November 08, 2002 11:30 AM
> > > > > To: Log4J Users List
> > > > > Subject: How to configure SMTPAppender?
> > > > >
> > > > >
> > > > > Hello,
> > > > >
> > > > > I want to configure SMTPAppender in my
> > > > log4j.xml file, and anyone tell
> > > > > me what is the syntax (tag)? I can't find any
> > > > document talking about the
> > > > > log4j xml structure.
> > > > >
> > > > > Regards,
> > > > > Louis
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > To unsubscribe, e-mail:
> > > >
> > 
> > > > > For additional commands, e-mail:
> > > > 
> > > > >
> > > > > --
> > > > > To unsubscribe, e-mail:
> > > >
> > 
> > > > > For additional commands, e-mail:
> > > > 
> > > > >
> > > > > --
> > > > > To unsubscribe, e-mail:
> > > >
> > 
> > > > > For additional commands, e-mail:
> > > > 
> > > > >
> > > > > --
> > > > > To unsubscribe, e-mail:
> > > >
> > 
> > > > > For additional commands, e-mail:
> > > > 
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > >
> > 
> > > > For additional commands, e-mail:
> > > > 
> > > >
> > >
> > >
> > > __
> > > Do you Yahoo!?
> > > U2 on LAUNCH - Exclusive greatest hits videos
> > > http://launch.yahoo.com/u2
> > >
> > > --
> > > To unsubscribe, e-mail:
> > 
> > > For additional

Extra newline in Websphere output vs. standalone program??

2002-11-08 Thread Bomb Diggy
Hi,

I'm using the following log4j.properties with my WSAD
(Websphere) 4.0.3 IDE.  It works fine for standalone
Java applications, but when I make log4j calls from a
server-based class, say a servlet, I get an extra
newline - presumably b/c it's now being logged into
the Websphere Test Server log?  If I take the '%n' off
the 'layout' line (below) I lose all newlines in my
regular standalone java app output.  

Any ideas?

log4j.rootLogger=DEBUG, Console
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout.ConversionPattern=%-5p
%c{1}.%M(): %m%n

Thanks.


__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

--
To unsubscribe, e-mail:   
For additional commands, e-mail: