Re: Using markers or ThreadContext to select logger via slf4j

2014-12-19 Thread James Hutton
Goers wrote: > What do you mean by “request flow”? You can certainly do this in your > code. > > Ralph > > > On Dec 19, 2014, at 6:10 AM, James Hutton > wrote: > > > > I have some libraries that leverage slf4j for logging (can't change it) > > however

Using markers or ThreadContext to select logger via slf4j

2014-12-19 Thread James Hutton
I have some libraries that leverage slf4j for logging (can't change it) however my application leverages log4j2 and the slf4j-log4j2 bridge. I was wondering if there is a way I can at the beginning of the request flow set a value in the ThreadContext or something so that the slf4j loggers will rou

Re: Issue of creating and configuring custom appenders

2014-06-04 Thread James Hutton
Yeah, ideally there's a limit to the buffer in both choices, however why aren't you just logging to a file and using the jtextarea to display the file contents? Then you don't have as much a worry about memory usage. On Jun 4, 2014 8:27 AM, "Gary Gregory" wrote: > Note that you will shoot yoursel

Re: Issue of creating and configuring custom appenders

2014-06-04 Thread James Hutton
Maybe have the appender be the owner of the jtextarea such that you could call a gettextarea method when initializing your ui? Or you could buffer until you call an initialize method with the jtext area. With the first one not sure if you can write to the text area if it isn't in a frame, but I'm

Re: DailyRollingFileAppender with Max size

2014-06-04 Thread James Hutton
t; > > > > > > > > > > > > > > > > > > > > > On Tue, Jun 3, 2014 at 5:17 AM, James Hutton > > wrote: > > > > > Akash, > > > You can, bu

Re: DailyRollingFileAppender with Max size

2014-06-03 Thread James Hutton
Akash, You can, but I think without modifying the conversion pattern (adding %i) it isn't possible. You can use multiple rollover policies, you would end up using the SizeBaseRolloverPolicy(?). I'm assuming if you have the time based rollover policy that you're using the date string. James On

RolloverPolicy and getting all associated files

2014-05-16 Thread James Hutton
essor. Reason being is that the indexing is unbounded so I don't want to go from 1 to 4000 in a loop if all the indexes present are 3990->4000, seems like a waste of 3989 iterations. Thanks, James Hutton

Re: One appender, multiple layouts

2014-04-21 Thread James Hutton
h > > > On Apr 21, 2014, at 5:21 AM, James Hutton > wrote: > > > > Hi, > > Still trying to wrap my head around markers a bit, but I was wondering if > > it was possible to use a marker to determine which layout the event was > > formatted with to the same a

One appender, multiple layouts

2014-04-21 Thread James Hutton
Hi, Still trying to wrap my head around markers a bit, but I was wondering if it was possible to use a marker to determine which layout the event was formatted with to the same appender. If there is any documentation or examples that would be helpful and most appreciated. James

Re: Merging log4j2 contexts

2014-03-31 Thread James Hutton
> I think there already is a Jira issue for that. > > Ralph > > > On Mar 30, 2014, at 10:45 AM, Matt Sicker wrote: > > > > Hmm, that feature is not in Log4j 2 it seems. It sounds like a really > neat > > feature idea, though. Could you file a feature request o

Merging log4j2 contexts

2014-03-29 Thread James Hutton
I'm looking to leverage log4j2 in a spring application that uses spring profiles heavily. I know in log4j1.2 we could use the DOMConfigurator to parse an additional xml and merge it into the context. James