[Asterisk-code-review] ARI: Rotate log channels. (asterisk[13])
Mark Michelson
asteriskteam at digium.com
Fri Jul 31 11:03:12 CDT 2015
Mark Michelson has posted comments on this change.
Change subject: ARI: Rotate log channels.
......................................................................
Patch Set 4: Code-Review-1
(2 comments)
https://gerrit.asterisk.org/#/c/988/4/main/logger.c
File main/logger.c:
Line 946: ast_str_append(&filename, 0, "/var/log/asterisk/%s", log_channel);
Do not use "/var/log/asterisk" directly. Some people use alternate locations for their Asterisk logs. The location is stored in a constant called ast_config_AST_LOG_DIR. Use that instead.
ast_str_append(&filename, 0, "%s/%s", ast_config_AST_LOG_DIR, log_channel);
Line 950: ast_mkdir(ast_config_AST_LOG_DIR, 0777);
I suggest setting the mode to 0644 instead of 0777. That gives the asterisk user read and write permission, and others read permission. You don't want this to be executable.
--
To view, visit https://gerrit.asterisk.org/988
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iaefa21cbbc1b29effb33004ee3d89c977e76ab01
Gerrit-PatchSet: 4
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list