Hi all,

this is the first time I'm writing to a mailing list - I hope I will do
it the right way :)


I migrated a few days ago from Log4J 1.2 to Log4J 2: In general I must
say: nice work guys and nice plugin system!

But: I'm struggling with finding a way to get notice about the exact
size of written bytes. I want to find a way how to do some stuff when X
bytes were written in Y seconds. I couldn't use a filter and check the
LogEvent because it's not possible to get the actual size of written
bytes afterwards (because the layout will transform this...)

I'm using a RollingFileAppender and could see, that this is using the
RollingFileManager and the perfect way would be to hook into this
write(byte[]) method.. but I can't find how to do this.

In general I would create a subclass and overwrite write(byte[]).. but
this is impossible because everything there is final. All appenders, all
appender managers, all layouts, ... and I think it's not the way it
should be when I create a new "MyRollingFileAppender" and copy all the
stuff and add the part I need to the write method.


So is there anybody who could maybe help and know a solution for this
problem? And is there a specific reason that everything is final? :(



Thank you in advance and best regards,

Christian

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org

Reply via email to