Yes but you also want to set the additivity for your appenders.

On Thu, Jan 27, 2011 at 10:18 AM, Umesh Awasthi <[email protected]> wrote:
> Rodney ,
> Thanks for the replt
> i am new to Log4j can you descibe it a bit with some out line example so it
> will help me to pick the thing better way.
> what i am able to understand from your point is that you are saying
> something like
>
> SimpleLayout layout = new SimpleLayout();
>      FileAppender appender = new FileAppender(layout,"your
> filename",false);
>      logger.addAppender(appender);
>
> On Thu, Jan 27, 2011 at 10:41 PM, Rodney Beede
> <[email protected]>wrote:
>
>> Simply create a new logger with no appenders and attach a new file
>> appender to that logger.  Use that new logger only for the class
>> running the import.
>>
>> On Thu, Jan 27, 2011 at 10:07 AM, Umesh Awasthi <[email protected]>
>> wrote:
>> > Hi All,
>> >
>> > I am working on an module for import process which can be triggered by
>> > various way by user click by schdular etc. and it will go with the phasse
>> of
>> > validation and if validation is success than final import. in order to
>> show
>> > up validation error to the user we want to use the log file so that if
>> > validation failed we will just pick the log file and show that in a
>> window.
>> > So far everything was fine but now i need to create a logfile for each
>> > import job something like when a job start get timestamp and name the log
>> > file based on the time stamp also same time for each job i need to store
>> the
>> > log file name for that job so that later can pick the same log file for
>> > display purpose.
>> > i gone through various questions on found by googling  but seems that the
>> > requirement was quite different. One approach which i came to know is to
>> get
>> > list of all appenders and den override the name of the file in the code
>> but
>> > since we are in web-application i am not sure about the thread safty and
>> any
>> > other potential issue
>> > Can some one suggest me how i can create a seperate log file for each
>> import
>> > process instance.
>> >
>> > --
>> > With Regards
>> > Umesh Awasthi
>> > Software Engineers never die… They just go Offline
>> > http://travelling-rants.blogspot.com/
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
>
> --
> With Regards
> Umesh Awasthi
> Software Engineers never die… They just go Offline
> http://travelling-rants.blogspot.com/
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to