Here is the problem:
I want to add row indexer (row number or iterator) to each row in log file.
I don’t need it to be unique for the whole log file, but only for the “application session” (i. e. each time Win32 application started, we begin our countdown: 1, 2, 3 and so on)
Is where any built-in way (conversionpattern tag syntax) or some custom extension?
Thanks a lot!
My solution only works for one appender only and the counter will be reset every time you start the application.
You could use a pattern converter:
then you configure it like this:
The [] brackets are of course optional. You could also do something like this
%6LCwhich would pad the line with spaces so that you get the message aligned nicely.