Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework debug into full syslog wrapper #358

Merged
merged 5 commits into from
Mar 4, 2025
Merged

Rework debug into full syslog wrapper #358

merged 5 commits into from
Mar 4, 2025

Conversation

dacav
Copy link
Contributor

@dacav dacav commented Mar 3, 2025

Now that the debug_file= option has been removed, and logging is only sent to syslog, we can make use of log levels.
The debug module is renamed as logging, and the dbg_debug call is replaced with LOG(Level, ...).
The configuration (cfg_t object) is no longer necessary in a number of functions, since it was only required as argument for the dbg_debug call.

@dacav dacav requested a review from LDVG March 3, 2025 14:18
dacav added 3 commits March 3, 2025 15:34
Keep debug_dbg macro for compatibility, to be removed
after adapting each calling site.
Call log_debug_enable() to enable logging
dacav added 2 commits March 3, 2025 15:48
Replace all debug_dbg() calls with LOG(), using an appropriate log level.

Erase the debug_dbg() as nothing is relying on it anymore.

The new LOG() macro does not depend on the configuration, so the configuration
object (of type cfg_t) does not need to be passed around as parameter.
This is aligned with the "Module Wrtiers' Guide" of pam-linux.

Enable mock_syslog for tests/expand in Autoconf, since tests/expand will now
use syslog(3). Not needed on CMake.
@dacav dacav merged commit e06110e into next Mar 4, 2025
31 checks passed
@dacav dacav deleted the dacav/syslog_2 branch March 4, 2025 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants