[asterisk-dev] [Code Review] 3185: Logger: Allow creation and removal of dynamic logger channels

Matt Jordan reviewboard at asterisk.org
Fri Feb 7 10:34:02 CST 2014



> On Feb. 5, 2014, 3:38 p.m., Matt Jordan wrote:
> > trunk/main/logger.c, lines 1074-1082
> > <https://reviewboard.asterisk.org/r/3185/diff/1/?file=53452#file53452line1074>
> >
> >     This would currently let a user delete a dynamic logger established by a module, i.e., the security logger. That's probably not good.
> >     
> >     This should only let the user delete a logger that was previously established via the CLI.
> 
> opticron wrote:
>     The security log creates a dynamic logger level, not a dynamic log output. There is currently no API to create log outputs dynamically.

I'd still rather only allow the user to delete what they created. The fact that lineno being -1 implying that the user created the log channel via the CLI seems like a double purposing of this variable, which is usually a bad sign.

I'd still rather see a different attribute added to the log channel structure that determines whether or not a user created the log channel.


- Matt


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3185/#review10769
-----------------------------------------------------------


On Feb. 7, 2014, 10:20 a.m., opticron wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3185/
> -----------------------------------------------------------
> 
> (Updated Feb. 7, 2014, 10:20 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: AST-1150
>     https://issues.asterisk.org/jira/browse/AST-1150
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This adds the ability to dynamically add and remove logger channels from Asterisk via the CLI.
> 
> 
> Diffs
> -----
> 
>   trunk/main/logger.c 407459 
> 
> Diff: https://reviewboard.asterisk.org/r/3185/diff/
> 
> 
> Testing
> -------
> 
> Verified that the logs created this way showed up where expected containing the correct logging levels.
> 
> "logger add channel /tmp/testchannel warning,error,verbose,notice"
> "logger remove channel /tmp/testchannel"
> 
> 
> Thanks,
> 
> opticron
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140207/cb5f54c5/attachment.html>


More information about the asterisk-dev mailing list