[Asterisk-code-review] logger: Always run rotate file on huge log files. (asterisk[15])

Corey Farrell asteriskteam at digium.com
Sun Oct 22 14:01:41 CDT 2017


Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/6862


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/62/6862/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/6862
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3633c24242b88da9daa1d2217dcde0b302e03653
Gerrit-Change-Number: 6862
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/85796e4e/attachment.html>


More information about the asterisk-code-review mailing list