java - Use arraylist to store the log events in memory - with rolling appender -
i'm going extends rollingfileappender. have defined size , amount of dile in log4j.properties:
log4j.appender.myapp.maxfilesize=20mb log4j.appender.myapp.maxbackupindex=5
my extenstion should save log event in memory , when there error, write them log.
i use arraylist<loggingevent> loggingevents = new arraylist<>();
but, don't know size give arraylist still work sizes defined above expected. suggestion?
thanks
Comments
Post a Comment