behavioral-model icon indicating copy to clipboard operation
behavioral-model copied to clipboard

Support configuring log rotation for bmv2 switch logs

Open drobinkent opened this issue 4 years ago • 6 comments

When I activate the logger in bmv2 software switches, the system only keeps last 4 log files. But I want to keep more than 4 log files.

Can someone kindly help me about, How to configure (where is the configuration) the system to increase the number of log files.

drobinkent avatar Jul 27 '20 15:07 drobinkent

bmv2 currently hardcodes it (3 log files of 5MB each): https://github.com/p4lang/behavioral-model/blob/master/src/bm_sim/logger.cpp#L45

It should be very easy for someone to expose new command-line options so this can be configured at runtime. So I am going to rename your issue and tag it as a "good first issue". @drobinkent if you want to take a stab at implementing this, it would be much appreciated!

As option names, I would suggest --log-max-files and --log-max-file-size.

antoninbas avatar Jul 28 '20 01:07 antoninbas

@antoninbas , I will certainly work on this after sometime.

drobinkent avatar Aug 13 '20 18:08 drobinkent

This issue should not be closed. It's a valid feature request which has bot been implemented yet.

antoninbas avatar Aug 13 '20 19:08 antoninbas

Sorry. My mistake. The closing was really not intentional.

drobinkent avatar Aug 14 '20 16:08 drobinkent

Can I take this issue?

PreritO avatar Jun 10 '21 20:06 PreritO

sure thing

antoninbas avatar Jun 10 '21 20:06 antoninbas

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment, or this will be closed in 180 days

github-actions[bot] avatar Jan 26 '23 00:01 github-actions[bot]