I have the following code in my setting file
'logfile': {
'level':'DEBUG',
'class':'logging.handlers.RotatingFileHandler',
'filename': LOG_ROOT + "/logfile",
'maxBytes': 50000,
'backupCount': 2,
'formatter': 'standard'
}
I have set the limit to 5MB, when it reaches to this level it creates new file but it has rights of root:root.
I want to set the rights of this file to www-data.
Any help should be appreciated.
Maybe this might help you.
The files created might have the property root:root because you execute this logfile tool with root privileges. If nothing helps, you might write a script that watches the new logs created and change the properties of it.