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

Add syslog supports #2537

Merged
merged 26 commits into from
Nov 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test on linux
Signed-off-by: tison <[email protected]>
tisonkun committed Nov 16, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 584e4dfbe817826afe9ff29cf59792e42a286b32
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -202,7 +202,7 @@ feature! {
pub mod spawn;
}

#[cfg(target_os = "macos")]
#[cfg(any(linux, macos))]
feature! {
#![feature = "syslog"]
pub mod syslog;
5 changes: 5 additions & 0 deletions src/syslog.rs
Original file line number Diff line number Diff line change
@@ -96,6 +96,11 @@ libc_bitflags! {
/// If syslog() cannot pass the message to syslogd(8) it will attempt to write the
/// message to the console ("/dev/console").
LOG_CONS;
/// The converse of [`LOG_NDELAY`][LogFlags::LOG_NDELAY]; opening of the connection is
/// delayed until `syslog` is called.
///
/// This is the default, and need not be specified.
LOG_ODELAY;
/// Open the connection to syslogd(8) immediately. Normally the open is delayed until
/// the first message is logged. Useful for programs that need to manage the order in
/// which file descriptors are allocated.
2 changes: 1 addition & 1 deletion test/test.rs
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ mod test_sendfile;
))]
mod test_spawn;

#[cfg(target_os = "macos")]
#[cfg(any(linux, macos))]
mod test_syslog;

mod test_time;