I will explain better .

I got many program , each program got his log. 

Sometimes , this log contains this word "SUIVI_TRT". like this 
log.info("[SUIVI_TRT] [TrtEnd=UPDATE_BORDERO] [ReturnCode=KO][ErrorCode=" +
flow.getErrorCode() + "] ");

I want to create a new logger , this one will take all the program logger
which only contains this work in log [SUIVI_TRT] .

That's the problem, how can log4j knows that the log contains  [SUIVI_TRT]
and he must put this new ligne in a new logger ( a new file). 





ralph.goers @dslextreme.com wrote:
> 
> I don't understand.  You stated you have a log that is currently being
> written. I presume this is going to some location and you would like that
> to continue. From your request it sounds like you want just the prefix
> portion to go to a separate log in addition to the first one.  To do that
> you just configure the single logger with two appenders - the original one
> and a new one with a layout that only generates the prefix.
> 
> Ralph
> 
> On Nov 21, 2011, at 8:46 AM, Kikou1984 wrote:
> 
>> 
>> Yes,  i should make as you said, but i want to use the first logger which
>> contains the string "[SUIVI_TRT]".
>> 
>> I want to create like a parse , catch logger where contains [SUIVI_TRT]
>> and
>> put this ligne on a new logger.
>> 
>> 
>> 
>> ralph.goers @dslextreme.com wrote:
>>> 
>>> Then to write to the second log you will need to write your own Layout
>>> and
>>> parse out what you want from the message.
>>> 
>>> Ralph
>>> 
>>> On Nov 21, 2011, at 8:31 AM, Kikou1984 wrote:
>>> 
>>>> 
>>>> Hi ,
>>>> 
>>>> thank u for u r anserw, I have to work with the existing log.
>>>> 
>>>> 
>>>> 
>>>> ralph.goers @dslextreme.com wrote:
>>>>> 
>>>>> Do you have the ability to modify the program or do you have to work
>>>>> with
>>>>> the existing log that is being generated?
>>>>> 
>>>>> Ralph
>>>>> 
>>>>> On Nov 21, 2011, at 6:41 AM, Kikou1984 wrote:
>>>>> 
>>>>>> Hello, I got a program , it uses log4J for creating log. Exemple :
>>>>>> log.info("[SUIVI_TRT] [TrtStart : UPDATE_BORDERO]" + " [InputFile=" +
>>>>>> args[2] + "] [ParamFile=" + args[1] + "] [OutputPath="+args[3]+"]
>>>>>> [mode="
>>>>>> +args[0]+"]" +"[XmlConfigMail =" + args[4] + "]"); I would like to
>>>>>> create
>>>>>> another Log, which contains only Log with this String "[SUIVI_TRT]".
>>>>>> Is
>>>>>> it possible ?!! 
>>>>>> View this message in context: Find word in log
>>>>>> Sent from the Log4j - Dev mailing list archive at Nabble.com.
>>>>> 
>>>>> 
>>>>> 
>>>> 
>>>> -- 
>>>> View this message in context:
>>>> http://old.nabble.com/Find-word-in-log-tp32870799p32871018.html
>>>> Sent from the Log4j - Dev mailing list archive at Nabble.com.
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [email protected]
>>>> For additional commands, e-mail: [email protected]
>>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>> 
>>> 
>>> 
>> 
>> -- 
>> View this message in context:
>> http://old.nabble.com/Find-word-in-log-tp32870799p32871053.html
>> Sent from the Log4j - Dev mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Find-word-in-log-tp32870799p32871125.html
Sent from the Log4j - Dev mailing list archive at Nabble.com.


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

Reply via email to