Add comment explaining log file reopening for rotation support (#956)
This commit is contained in:
parent
744b13e302
commit
2b71a78241
@ -122,6 +122,9 @@ void serverLogRaw(int level, const char *msg) {
|
|||||||
level &= 0xff; /* clear flags */
|
level &= 0xff; /* clear flags */
|
||||||
if (level < server.verbosity) return;
|
if (level < server.verbosity) return;
|
||||||
|
|
||||||
|
/* We open and close the log file in every call to support log rotation.
|
||||||
|
* This allows external processes to move or truncate the log file without
|
||||||
|
* disrupting logging. */
|
||||||
fp = log_to_stdout ? stdout : fopen(server.logfile, "a");
|
fp = log_to_stdout ? stdout : fopen(server.logfile, "a");
|
||||||
if (!fp) return;
|
if (!fp) return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user