Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6129

Django application logs are not rotated

$
0
0

In a Django application, version 3.2.14, running on an ec2 instance that also has a gunicorn web server with 9 workers, plus ngnix and with the log configuration shown below, the files are not rotated.

The user of the gunicorn service is ubuntu and belongs to the group: www-data

What could it be? Is there an issue with gunicorn and the workers?

I appreciate your answers.

LOGGING = {"version": 1,"disable_existing_loggers": False,"formatters": {"simple": {"format": "%(levelname)s %(message)s"},"verbose": {"format": "[%(levelname)8s] [%(asctime)s] [%(funcName)30s] %(message)s"        },"elegant": {"format": ("%(asctime)s [%(levelname)-8s] " "(%(module)s.%(funcName)s) %(message)s"            ),"datefmt": "%Y-%m-%d %H:%M:%S",        },    },"handlers": {"console": {"level": "INFO","class": "logging.StreamHandler","formatter": "elegant",        },"app": {"level": "INFO","class": "logging.handlers.TimedRotatingFileHandler","formatter": "elegant","filename": os.path.join("logs", "app"),"when": "D","interval": 30,"encoding": "utf-8",        },"groups": {"level": "INFO","class": "logging.handlers.TimedRotatingFileHandler","formatter": "elegant","filename": os.path.join("logs", "groups"),"when": "D","interval": 30,"encoding": "utf-8",        },    },"root": {"level": "INFO","handlers": ["console"],"formatter": "elegant",    },"loggers": {"app": {"level": "INFO","handlers": ["app"],"propagate": True,        },"groups": {"level": "INFO","handlers": ["groups"],"propagate": True,        },    },}

Viewing all articles
Browse latest Browse all 6129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>