{"id":58186,"library":"syslog","title":"Syslog","description":"Formats and writes syslog messages to Unix sockets, UDP, or TCP exporters.","status":"active","version":"7.0.0","language":"rust","source_language":null,"source_url":"https://github.com/Geal/rust-syslog","tags":["syslog","logging","unix","network"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nsyslog = \"7.0.0\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add syslog","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"Facility","correct":"use syslog::Facility;"}],"quickstart":{"code":"use syslog::{Facility, Formatter3164, Logger, BasicLogger};\nuse log::SetLoggerError;\n\nfn init_logger() -> Result<(), SetLoggerError> {\n    let formatter = Formatter3164 {\n        facility: Facility::LOG_USER,\n        hostname: None,\n        process: \"myapp\".into(),\n        pid: 0,\n    };\n    let logger = Logger::new(formatter, syslog::unix()).unwrap();\n    log::set_boxed_logger(Box::new(BasicLogger::new(logger))).map(|()| log::set_max_level(log::LevelFilter::Info))\n}","lang":"rust","description":"Initialize a syslog logger with RFC 3164 formatting."},"warnings":[{"fix":"Use `syslog::tcp()` or `syslog::udp()` for remote syslog servers.","message":"Unix socket path may not exist on all systems; fallback to UDP/TCP may be needed.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"search_vec":"'export':13 'format':2 'log':15 'messag':6 'network':17 'socket':9 'syslog':1,5,14 'tcp':12 'udp':10 'unix':8,16 'write':4","created_at":"2026-06-16T16:14:33.798905+00:00","updated_at":"2026-06-16T16:14:33.798905+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/Geal/rust-syslog","github":"https://github.com/Geal/rust-syslog","docs":"https://docs.rs/syslog/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["logging"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-16","next_check":"2026-12-13","install_tag":null}}