[Asterisk-code-review] logger: Always run rotate file on huge log files. (asterisk[master])
Corey Farrell
asteriskteam at digium.com
Sun Oct 22 14:01:53 CDT 2017
Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/6863
Change subject: logger: Always run rotate_file on huge log files.
......................................................................
logger: Always run rotate_file on huge log files.
It's valid for rotatestrategy is NONE with exec_after_rotate set. This
could be used to setup external log rotation. When we encounter a huge
log file we should always call rotate_file to allow external log
rotation to deal with the rotation.
ASTERISK-27367
Change-Id: I3633c24242b88da9daa1d2217dcde0b302e03653
---
M main/logger.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/63/6863/1
diff --git a/main/logger.c b/main/logger.c
index 6060b3c..cb4cf38 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -1094,7 +1094,7 @@
}
if (f->fileptr && (f->fileptr != stdout) && (f->fileptr != stderr)) {
int rotate_this = 0;
- if (rotatestrategy != NONE && ftello(f->fileptr) > 0x40000000) { /* Arbitrarily, 1 GB */
+ if (ftello(f->fileptr) > 0x40000000) { /* Arbitrarily, 1 GB */
/* Be more proactive about rotating massive log files */
rotate_this = 1;
}
--
To view, visit https://gerrit.asterisk.org/6863
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3633c24242b88da9daa1d2217dcde0b302e03653
Gerrit-Change-Number: 6863
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171022/de1ccf33/attachment.html>
More information about the asterisk-code-review
mailing list