On Fri, 11 Apr 2008 09:58:23 -0400
"Robert Pepersack" <[EMAIL PROTECTED]> wrote:
Jake,
I've been thinking about your last reply.
I don't understand part of it.
You'll have to come up with some way to determine how you configure each
logger repository, though. You could pre-initialize all th
Jake,
I've been thinking about your last reply.
I don't understand part of it.
>You'll have to come up with some way to determine how you configure each
>logger repository, though. You could pre-initialize all the logger
>repositories based on the MDC value(s) you expect to select upon.
I un
Thanks for your help so far.
I have a RepositorySelector that uses the MDC to get the Hierarchy for the
currently running job.
But, there is a problem because of the way the Spring container creates my
jobs, initializes the jobs' loggers, and runs the jobs. The loggers for my
jobs get created
On Thu, 10 Apr 2008 10:49:50 -0400
"Robert Pepersack" <[EMAIL PROTECTED]> wrote:
I'm not confusing LogManager.setLoggerRepository(repository, guard) and
LogManager.getLoggerRepository(). I understand everything in Chapter 8.
Then you understand why there's no point to LogManager.getLoggerRe
How about including the job name in the logger name: jobName + "." +
getClass().getName()
Then you wouldn't need to do anything with repositories.
On Thu, Apr 10, 2008 at 9:49 AM, Robert Pepersack
<[EMAIL PROTECTED]> wrote:
> I'm not confusing LogManager.setLoggerRepository(repository, guard) and
I'm not confusing LogManager.setLoggerRepository(repository, guard) and
LogManager.getLoggerRepository(). I understand everything in Chapter 8.
I wouldn't be creating all that many repositories, just one for each of my jobs
(this is analogous to one repository per web application). I currently
Are you confusing LogManager.setLoggerRepository(repository, guard) with
LogManager.getLoggerRepository()? In whatever environment you are in, you just
need to make sure that you set your custom repository selector first thing, before
doing any logging. A servlet context listener was only a su
James and Jake, thanks for your replies.
I want to specify a RepositorySelector, because I'm using the Spring IOC
container to manage my application. The Spring IOC container is a J2SE
container, not J2EE. So, there is no ServletContext for me to use to determine
which repository to select.
Your repository selector selects the repository. You set the repository
selector by calling LogManager.setRepositorySelector(selector, guard). Note
that the guard is provided so that if someone else comes along a tries to
reset it, they will get an IllegalArgumentException and be prevented fro
If you provide the reason for your request we might be able to help better.
On Wed, Apr 9, 2008 at 10:58 AM, Robert Pepersack
<[EMAIL PROTECTED]> wrote:
> I've checked the archives and didn't find an answer, but please forgive me if
> this a duplicate post.
>
> I would like to be able to specify
I've checked the archives and didn't find an answer, but please forgive me if
this a duplicate post.
I would like to be able to specify a repository for my logger to use. For
example: Logger logger = new Logger("my.class.name", "myRepositoryName");
I read Chapter 8, "Extending log4j", and it
11 matches
Mail list logo