logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Kolotyluk" <eric.koloty...@kodak.com>
Subject RE: fixedWindowRollingPolicy.setFileNamePattern
Date Thu, 10 Jul 2008 13:58:05 GMT
OK, I found it now, thanks. I had to use WinZip to find it; Windows
Explorer could not see it for some reason.

I cannot understand why they put the jar file in such a subtle place - I
can see absolutely no point in that.

I'll play with it now. Thanks for the tip.

Cheers, Eric

-----Original Message-----
From: Jacob Kjome [mailto:hoju@visi.com] 
Sent: Wednesday, July 09, 2008 8:42 PM
To: Log4J Users List
Subject: Re: fixedWindowRollingPolicy.setFileNamePattern

Hi Eric,

Eric Kolotyluk wrote:
> OK, here's what I get when I try to build the extras.
> 
> Cheers, Eric
> 
> BUILD FAILED
> C:\Program Files\Apache\apache-log4j-extras-1.0\build.xml:76: Compile
> failed; see the compiler error output for details.
> 
> Total time: 2 seconds

Stupid me.  I guess I had made some unconscious assumption that extras
hadn't been
release yet.  It has and *does* come with a jar file that you can
download here...

http://logging.apache.org/log4j/companions/extras/download.html

The jar file exists in the same directory as the build.xml file in the
distribution archive.  The one curious thing is that it is stored as
".\apache-log4j-extras-1.0.jar".  I'm opening it with WinRAR.  Not sure
what you
see with WinZip or other archive tool?

In any case, Maven is not all that difficult to get working.  Just like
Ant, you
download it, extract it to a directory, put ${MAVEN_HOME}/bin in your
system path,
place the settings.xml (that I sent you privately) file in
${user.home}/.m2, and
type "mvn install".  Maven downloads all the compile-time dependencies
for you.
The reason your Ant build failed is that it references dependencies
located in
${user.home}/.m2/repository, which implies that you've already built
using Maven
which would have downloaded those dependencies for you.  That makes that
Ant build
not so useful, IMO.

Jake

> 
> 
> 
> 
> -----Original Message-----
> From: Jacob Kjome [mailto:hoju@visi.com] 
> Sent: Tuesday, July 08, 2008 10:31 PM
> To: Log4J Users List
> Subject: Re: fixedWindowRollingPolicy.setFileNamePattern
> 
> Ok, well, I checked it out and used Maven 2.0.9 to build.  I just
typed
> "mvn
> install".  It ran all tests and built the binary in 2 minutes.  What
> problem did
> you have?  Are you missing repositories in your
> ${user.home}/.m2/settings.xml?
> 
> Jake
> 
> Jacob Kjome wrote:
>> There is a plan to release it.  I think it's been waiting on Chainsaw
> 2 (or
>> vice-versa).  The extras are meant to work with Log4j 1.2.  Haven't
> tried to build
>> it in a quite a while.  I might have a crack at it tonight.
>>
>> Jake
>>
>>
>> Eric Kolotyluk wrote:
>>> Well, that was a good try
>>>
>>> The extras do not come with a jar file and trying to build the
>>> distribution fails.
>>>
>>> I would prefer it if someone would just add this functionality to
the
>>> 1.2 stream, at least that's a properly maintained release.
>>>
>>> - Eric
>>>
>>> -----Original Message-----
>>> From: Jacob Kjome [mailto:hoju@visi.com] 
>>> Sent: Tuesday, July 08, 2008 8:29 AM
>>> To: Log4J Users List
>>> Subject: Re: fixedWindowRollingPolicy.setFileNamePattern
>>>
>>> See the rolling package in the Log4j "extras" companion...
>>>
>>> http://logging.apache.org/log4j/companions/extras/index.html
>>>
>>> Jake
>>>
>>>
>>> On Tue, 8 Jul 2008 08:04:49 -0700
>>>   "Eric Kolotyluk" <eric.kolotyluk@kodak.com> wrote:
>>>> One of the nice features I like in log4j 1.3 is
>>>> FixedWindowRollingPolicy#setFileNamePattern();
>>>>
>>>> The log4j default rolling pattern looks like mylog.log1,
mylog.log2,
>>> ...
>>>> This makes it difficult for desktops to associate the file-type
with
>>>> application used for opening the log file for viewing so I like to
> use
>>>> FixedWindowRollingPolicy fixedWindowRollingPolicy = new
>>>> FixedWindowRollingPolicy();
>>>> fixedWindowRollingPolicy.setFileNamePattern("mylog%i.log");
>>>> fixedWindowRollingPolicy.setMaxIndex(9);
>>>> fixedWindowRollingPolicy.setMinIndex(0);
>>>>
>>>> This way I only have to associate the file suffix '.log' once, with
> my
>>>> favorite log file editor, and not for each of '.log1' '.log2' etc.
>>>>
>>>> It would be really nice to do this in log4j 1.2. Are there any
plans
>>> to
>>>> add this to the 1.2 stream?
>>>>
>>>> Cheers, Eric
>>>>
>>>>
> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>>
>>>>
>>>
---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>
>>>
>>>
---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>>
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message