This is a small addition to allow enabling and disabling of logging services, such as the audit log, from lib389. This is potentially useful for debuging in 389ds tests or in administration tools.
Enable and disable log service helpers. 0001-Add-log-service-enable-and-disable-commands-to-lib38.patch
Thanks for the contribution! This patch looks good, but there's one very minor issue. When setting a log to be enabled/disabled, you are using "level" as a parameter to distinguish which logging file to enable/disable. I think this can be confusing since you can set log "levels". Perhaps it should be renamed to "log_type", or something similar?
The reason for that naming is that if you look at the nearby function:
def loglevel(self, vals=(LOG_DEFAULT,), level='error', update=False):
They use 'level' to represent the log service. I kept it like this for "consistency" but really, I would have liked to have renamed both.
Replying to [comment:2 firstyear]:
The reason for that naming is that if you look at the nearby function: def loglevel(self, vals=(LOG_DEFAULT,), level='error', update=False):
Ah I see.
Let's rename both :-) I don't mind making changes like this because really lib389 is still in its infancy, and we haven't used loglevel in any of our CI testing suites. Just make sure "loglevel" is proproply refactored inside of lib389.
attachment 0001-Rename-level-to-service-in-all-log-related-functions.patch
I have attached a second patch which applies after the first. This renames all "level" arguments to "service" to make it clearer what each function is doing.
Happy to help!
Patch pushed upstream, thanks!
8a041b9..95c0640 master -> master commit 95c06407be2d98c95c904678afd11ff211e0cf70 Date: Wed Aug 5 15:12:30 2015 -0400
Milestone lib389 1.0 deleted
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/1568
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: Fixed)