comparison src/logging.rs @ 136:efbc235f01d3 default tip

Separate libpam-sys-helpers from libpam-sys. This separates the parts of libpam-sys that don't need linking against libpam from the parts that do need to link against libpam.
author Paul Fisher <paul@pfish.zone>
date Thu, 03 Jul 2025 14:28:04 -0400
parents 6c1e1bdb4164
children
comparison
equal deleted inserted replaced
135:b52594841480 136:efbc235f01d3
15 //! and may even itself implement `log::Log`, but that interface is not exposed 15 //! and may even itself implement `log::Log`, but that interface is not exposed
16 //! to the generic PAM user. 16 //! to the generic PAM user.
17 17
18 #[cfg(pam_impl = "OpenPam")] 18 #[cfg(pam_impl = "OpenPam")]
19 mod levels { 19 mod levels {
20 pub const ERROR: i32 = libpam_sys::PAM_LOG_ERROR; 20 use libpam_sys_helpers::constants;
21 pub const WARN: i32 = libpam_sys::PAM_LOG_NOTICE; 21
22 pub const INFO: i32 = libpam_sys::PAM_LOG_VERBOSE; 22 pub const ERROR: i32 = constants::PAM_LOG_ERROR;
23 pub const DEBUG: i32 = libpam_sys::PAM_LOG_DEBUG; 23 pub const WARN: i32 = constants::PAM_LOG_NOTICE;
24 pub const INFO: i32 = constants::PAM_LOG_VERBOSE;
25 pub const DEBUG: i32 = constants::PAM_LOG_DEBUG;
24 } 26 }
25 #[cfg(not(pam_impl = "OpenPam"))] 27 #[cfg(not(pam_impl = "OpenPam"))]
26 mod levels { 28 mod levels {
27 pub const ERROR: i32 = libc::LOG_ERR; 29 pub const ERROR: i32 = libc::LOG_ERR;
28 pub const WARN: i32 = libc::LOG_WARNING; 30 pub const WARN: i32 = libc::LOG_WARNING;