Closed timomrs closed 6 months ago
Thanks for the feature request. I have some doubts though, as this would basically replicate syslog
of which many, many implementations exist.
So what would be the benefit? Maybe you have a concrete use case for this feature request?
First, let me confess my ignorance: I come from a windows background, though I'm working on a Linux system now, so syslog was not familiar to me before. After some googling, what I'm getting is that it's a framework for handling logs in *nix systems, including sharing / consolidating them over the network. The basic logging call in such systems is syslog()
, so is your suggestion to switch to a completely different logging framework? How would that solve the problem of limiting total log sizes?
Or did you perhaps mean logrotate
?
Anyway, the use case, from my point of view: our deployment team wants this feature, I believe they'd prefer to limit the number of independent apps / configurations to maintain. I'm sure they know of logrotate
, but I'll ask them what's the case for not using it.
I see, thanks for the elaborate explanation.
Yes, I mean syslog / logrotate, as there are multiple implementations out there, and some are packaged together.
This should not be a problem on Windows Server, too.
Why not just let Drogon log endlessly and let the system logger, which is already present on every modern system, do its job?
We support "log_size_limit" and "max_files" now.
The current log size limit creates a new file after a set size limit. However, no log files are removed, which means that apps which log regularly will eventually fill the disk, given enough time.
It would be useful to be able to set a total size or age limit to the logs, after which they are deleted. Imaginary example of
config.json
log section:Of course, similar behaviour can be created with a cronjob etc, but it would be useful to have this directly in the framework.