Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/10116 )

Change subject: logging: Fix logging level all
......................................................................


Patch Set 1:

(3 comments)

https://gerrit.osmocom.org/#/c/10116/1/src/logging.c
File src/logging.c:

https://gerrit.osmocom.org/#/c/10116/1/src/logging.c@70
PS1, Line 70: 0
> Feel free to use 'LOGL_UNSET' here ;)
Good catch, thanks.


https://gerrit.osmocom.org/#/c/10116/1/src/logging.c@721
PS1, Line 721:  for (i = 0; i < osmo_log_info->num_cat; i++) {
> Would be great to have a comment here, what this loop […]
About what the loop does: yes, it resets all categories to unset.

Regarding your example: yes, it works like that.

I also thought about what you mentioned. I actually thought about calling it 
"logging level unset <loglevel>", which would basically apply to all unset 
categories. It would be the same as "all", but without forcing reset of the 
categories.
I even though about changing log_set_log_level() to contain a "bool reset" 
param, but since it's actually a public API we cannot do that. Looking at 
current users of log_set_log_level() through all osmocom projects, I think in 
general the desired behaviour is to reset the categories. I would then have 
another function to log_set_log_level2(struct log_target *target, int 
log_level, bool reset), and use the reset=false only in the case of "logging 
level unset <loglevel>" in VTY.

Agree?


https://gerrit.osmocom.org/#/c/10116/1/src/vty/logging_vty.c
File src/vty/logging_vty.c:

https://gerrit.osmocom.org/#/c/10116/1/src/vty/logging_vty.c@a283
PS1, Line 283:
> Probably, it makes sense to keep informing user that 'everything' is 
> deprecated, but now is reused a […]
I would expect "everything" to not be available anymore after this patch, so 
parsing should fail before this point.



--
To view, visit https://gerrit.osmocom.org/10116
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0f50ad8d6fd038398f7d751287417505c8dcdeff
Gerrit-Change-Number: 10116
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <[email protected]>
Gerrit-CC: Vadim Yanitskiy <[email protected]>
Gerrit-Comment-Date: Mon, 23 Jul 2018 13:53:15 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No

Reply via email to