Async loggers use the LMAX disruptor to remove lock contention when many threads are logging simultaneously. This is faster than the queue used by AsyncAppender. This is all documented I think, but let me know what part of the current docs should be fixed.
By default the disruptor ringbuffer is configured to be very large & will consume about 30 MB of memory. This bit can be documented better. I didn't think it mattered whether the underlying appender does file IO or network IO. Did I miss something? Remko On Thursday, October 31, 2013, Scott Deboy wrote: > I'm not clear myself on when an async logger is useful - I am more > familiar with the (previously existing) concept of async appenders. > > I think the documentation in this area needs to be enhanced to explain > why you would use async loggers or async appenders, particularly for > file IO. > > As for generating log files with dates, yes, you can specify your own > date-related pattern with a RollingFileAppender. See the > documentation on RollingFileAppender and examples here: > http://logging.apache.org/log4j/2.x/manual/appenders.html > > Scott > > On 10/30/13, Mahesh Dilhan <[email protected]> wrote: > > Hi Scott > > > > I already configured it , yes it works for fileAppeders. > > I have seen the perftest of async logger. will there be performance hit > > with fileAppender compared to async logger? I already noticed time taken > > for initialization process is varying for file and random access file. is > > it because of "distruptor"? > > > > is there a way to output log file name as : > > "*web-application-context-path*-date.log" > > ? [configuration of log4j2,xml] > > > > Thanks > > > > > > > > > > On Thu, Oct 31, 2013 at 3:16 AM, Scott Deboy <[email protected]> > wrote: > > > >> Mi Mahesh, > >> > >> If you'd like to use Chainsaw with log4j2, you need to use the latest > >> Chainsaw developer snapshot, available here: > >> http://people.apache.org/~sdeboy > >> > >> If you use a file appender in your log4j configuration, add the JmDns > >> jar to your application classpath (http://jmdns.sourceforge.net), and > >> update your log4j configuration as described in the documentation > >> (including specifying a URI to your log file), Chainsaw should be able > >> to parse and tail your log file. > >> > >> Feel free to ask additional questions here on the user list. > >> > >> Scott > >> > >> On 10/28/13, Mahesh Dilhan <[email protected]> wrote: > >> > Thanks for the clarification Remko > >> > > >> > > >> > On Tue, Oct 29, 2013 at 8:52 AM, Remko Popma <[email protected]> > >> wrote: > >> > > >> >> Hi Mahesh, > >> >> > >> >> Thank you for re-posting your question to the user mailing list. > >> >> > >> >> The Status Logger is a special logger used by log4j internally. > >> >> If you set it to "debug" or "trace" (by starting your config xml file > >> >> with <Configuration > >> >> status="debug">...), > >> >> it will output things like which appenders and loggers were > >> >> initialized, > >> >> which log4j plugins were found, etc. > >> >> Any configuration problems will show up in the status log. > >> >> The status log output will appear on the console (System.out). > >> >> > >> >> In JConsole, this internal logging is what you see in the > StatusLogger > >> >> tab. > >> >> > >> >> I'm guessing from your question that you would like to see the log > >> >> statements produced by your application in the JConsole viewer. > >> >> Unfortunately, JMX currently does not provide a way to show the > >> >> content > >> >> of > >> >> application log files. > >> >> > >> >> If you are looking for a tool that allows you to view the log file > >> >> from > >> a > >> >> remote machine you may want to take a look at Chainsaw. > >> >> http://logging.apache.org/chainsaw/ > >> >> > >> >> Scott Deboy has been doing work to make Chainsaw's zeroconf feature > >> >> work > >> >> well with log4j2. > >> >> I am not that familiar with Chainsaw, but perhaps this documentation > >> >> can > >> >> get you started: > >> >> > >> >> > >> > http://logging.apache.org/log4j/2.x/manual/configuration.html#AdvertisingAppenderConfigurations > >> >> > >> >> Best regards, > >> >> Remko > >> >> > >> >> > >> >> > >> >> On Tue, Oct 29, 2013 at 9:58 AM, Mahesh Dilhan < > >>
