[Asterisk-code-review] ARI: Rotate log channels. (asterisk[master])
Ashley Sanders
asteriskteam at digium.com
Fri Jul 31 11:37:16 CDT 2015
Ashley Sanders has posted comments on this change.
Change subject: ARI: Rotate log channels.
......................................................................
Patch Set 2: Code-Review-1
(3 comments)
Very minor stuff. Otherwise looks good :)
https://gerrit.asterisk.org/#/c/989/2/main/logger.c
File main/logger.c:
Line 935: return 0;
You can return success here.
Line 947: manager_event(EVENT_FLAG_SYSTEM, "LogChannel", "Channel: %s\r\nEnabled: Yes\r\n", f->filename);
This line probably should be slpit into two lines - it goes ~20ish characters past the 100 mark column.
https://gerrit.asterisk.org/#/c/989/2/res/ari/resource_asterisk.c
File res/ari/resource_asterisk.c:
Line 641: if (!success) {
According to your code, there are actually two reasons why this would fail:
-- Allocation failed for generating the file name (which I think is usually a 500, Internal Server Error, "Allocation failed" response)
-- The log channel does not exist.
Maybe modify the return of the function (like -1 is allocation error, 0 is log does not exist, 1 is success) such that you can discern between the two possibilities? Just a thought.
--
To view, visit https://gerrit.asterisk.org/989
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iaefa21cbbc1b29effb33004ee3d89c977e76ab01
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Ashley Sanders <asanders at digium.com>
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