the default logging class AgentLogImpl can log to a file when logging is initialized using DefaultLog::init(new AgentLogImpl("filename"));. And log levels can be changed using DefaultLog::log()->set_filter() or DefaultLog::log()->set_profile().
There is currently no size check in AgentLogImpl, only a function to set a new log file name AgentLogImpl::set_dest(const char*) or a new file descriptor AgentLogImpl::set_dest(FILE*). So you can either add code in your application to check the file size and trigger the log file switch through these functions, or you could subclass from AgentLogImpl and do this size check inside the logging class.
Thank you for your prompt answer and help.
I guess as you did not mention anything about run time change of log levels/class based on environment variable value, I would need to implement it my self too, right?
You can change the log level at runtime without any problem.
Besides doing it programmatically, you can do it via SNMP SET operations too.
See the AGENTPP-CONFIG-MIB for details.
Thank you. This is very useful information and exactly what I was looking for to enable logging
if I have to debug something in run time and then stop it when not needed.