Reputation: 884
I want that everytime when log4cxx creates new log file it would write special string on top (as the first message) of the log file.
How can I force it to do so ?
Thank You!
Upvotes: 0
Views: 336
Reputation: 73
You can create your layout from log4cxx::PatternLayout
and reimplement appendHeader()
, this function is called from log4cxx::FileAppender::setFile()
(through log4cxx::WriterAppender::writeHeader()
)when file created.
Upvotes: 3