If "fixed string" means the string stays the same throughout the lifetime of
the running application you can use the MDC. You add your string into the MDC
at startup and reference its key within the layout pattern ("X{<key>}").
Heri
-----Ursprüngliche Nachricht-----
Von: durbans [mailto:[email protected]]
Gesendet: Montag, 22. Juni 2009 12:24
An: [email protected]
Betreff: Log4j : Read String from file
Now I am logging this kind of string
2009-06-19 15:31:17,636 DEBUG
with this ConversionPattern
<layout class="org.apache.log4j.PatternLayout">
</layout>
I'd like to insert a String like this
2009-06-19 15:31:17,636 XXXXYYMM_HHMMSS DEBUG
where XXXXYYMM_HHMMSS is a fixed string read from a file.
Is it possibile to do it ? How ?
--
View this message in context:
http://www.nabble.com/Log4j-%3A-Read-String-from-file-tp24144879p24144879.html
Sent from the Log4j - Users 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]