0

I want spilt logs based on the specified size for Daily basis using Log4j properties. Could you please suggest me how to use?

For example:

  • If log exceeds to 1GB I need to stop log to be append and has to be create new log.
  • Previous log should be available as well on daily basis.
4
  • 1
    You can use configure RollingFileAppender and set the maximumFileSize option.
    – Cyrbil
    Jul 10, 2015 at 11:42
  • In RollingFileAppendar, can we use daily basis ? how logs will create. MaxBackupIndex means no.of logs we can mention . if no of logs got created how the process will happend?
    – Gopi
    Jul 10, 2015 at 12:46
  • Is this log4net or log4j?
    – stuartd
    Jul 10, 2015 at 12:53
  • I linked you a doc ... like first line ... RollingFileAppender can roll log files based on size or date or both depending on the setting of the RollingStyle property.. Just rtm.
    – Cyrbil
    Jul 10, 2015 at 14:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.