I would like to know if there are any logger libraries for C , that can do circular file logging?
I am currently looking at log4C, But cant find enough docs on it that can say it will do circular logging.
if anyone has done this. kindly let me know.
Thanks
It seems Log4C is not painfully well documented at this point. They do point at the Log4J page though, which mentioned "rolling" logs, is that perhaps what you want? It could be just a question of terminology confusion.
Are you really sure you want circular logging? I think you would be better off with rolling logs.
i.e.
circular logging: log to log.1 then log.2 then log.3 then log.4 then back log.1
rolling logging: have four log files, where log.1 is always the most recent, and log.2,3,4 are older log entries?
here is an example
This is a cut down version. In ours we use vargs and format them before calling log_it.
I hope that helps.
dave