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 > > > <code>doAppend(LoggingEvent)</code> method wich > is > > > the > > > method called by the Logger to report > > LoggingEvents. > > > This method is synchronized and calls the > > > <code>append(LoggingEvent)</code> 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: > > > > > > <mailto:log4j-user-unsubscribe@;jakarta.apache.org> > > > > For additional commands, e-mail: > > > > <mailto:log4j-user-help@;jakarta.apache.org> > > > > > > > > > > > > > > __________________________________________________ > > > Do you Yahoo!? > > > U2 on LAUNCH - Exclusive greatest hits videos > > > http://launch.yahoo.com/u2 > > > > > > -- > > > To unsubscribe, e-mail: > > > > <mailto:log4j-user-unsubscribe@;jakarta.apache.org> > > > For additional commands, e-mail: > > > <mailto:log4j-user-help@;jakarta.apache.org> > > > > > > -- > > > To unsubscribe, e-mail: > > > > <mailto:log4j-user-unsubscribe@;jakarta.apache.org> > > > For additional commands, e-mail: > > > <mailto:log4j-user-help@;jakarta.apache.org> > > > > > > > > > __________________________________________________ > > Do you Yahoo!? > > U2 on LAUNCH - Exclusive greatest hits videos > > http://launch.yahoo.com/u2 > > > > -- > > To unsubscribe, e-mail: > > <mailto:log4j-user-unsubscribe@;jakarta.apache.org> > > For additional commands, e-mail: > > <mailto:log4j-user-help@;jakarta.apache.org> > > > > -- > > To unsubscribe, e-mail: > > <mailto:log4j-user-unsubscribe@;jakarta.apache.org> > > For additional commands, e-mail: > > <mailto:log4j-user-help@;jakarta.apache.org> > > > > > __________________________________________________ > Do you Yahoo!? > U2 on LAUNCH - Exclusive greatest hits videos > http://launch.yahoo.com/u2 > > -- > To unsubscribe, e-mail: > <mailto:log4j-user-unsubscribe@;jakarta.apache.org> > For additional commands, e-mail: > <mailto:log4j-user-help@;jakarta.apache.org> > > -- > To unsubscribe, e-mail: > <mailto:log4j-user-unsubscribe@;jakarta.apache.org> > For additional commands, e-mail: > <mailto:log4j-user-help@;jakarta.apache.org> > __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- To unsubscribe, e-mail: <mailto:log4j-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:log4j-user-help@;jakarta.apache.org>