{"id":14954333,"url":"https://github.com/ageagainstthemachine/circuitpython-usyslog","last_synced_at":"2025-10-03T06:31:09.817Z","repository":{"id":195412229,"uuid":"692572978","full_name":"ageagainstthemachine/circuitpython-usyslog","owner":"ageagainstthemachine","description":"Simple remote syslog client for CircuitPython","archived":false,"fork":true,"pushed_at":"2023-09-17T19:55:16.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-09-20T11:12:26.975Z","etag":null,"topics":["circuitpython","circuitpython-library","syslog","syslog-client"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"kfricke/micropython-usyslog","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ageagainstthemachine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-16T22:36:46.000Z","updated_at":"2023-09-17T19:50:09.000Z","dependencies_parsed_at":"2023-09-17T20:53:49.858Z","dependency_job_id":null,"html_url":"https://github.com/ageagainstthemachine/circuitpython-usyslog","commit_stats":null,"previous_names":["ageagainstthemachine/circuitpython-usyslog"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ageagainstthemachine%2Fcircuitpython-usyslog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ageagainstthemachine%2Fcircuitpython-usyslog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ageagainstthemachine%2Fcircuitpython-usyslog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ageagainstthemachine%2Fcircuitpython-usyslog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ageagainstthemachine","download_url":"https://codeload.github.com/ageagainstthemachine/circuitpython-usyslog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219867809,"owners_count":16554363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["circuitpython","circuitpython-library","syslog","syslog-client"],"created_at":"2024-09-24T13:01:50.418Z","updated_at":"2025-10-03T06:31:09.812Z","avatar_url":"https://github.com/ageagainstthemachine.png","language":"Python","readme":"# circuitpython-usyslog\nThis CircuitPython module implements a simple syslog client for CircuitPython. Currently only UDP-based remote logging without timestamps is implemented. This is a fork of [micropython-usyslog](https://github.com/kfricke/micropython-usyslog) which has been updated to incorporate changes required for modern CircuitPython usage.\n\n## Features\n- **UDP Transport**: Sends syslog messages over UDP via the CircuitPython-compatible `socketpool` module.\n- **Facility \u0026 Severity Constants**: Predefined constants for all standard RFC 3164 facilities (KERN, USER, MAIL, DAEMON, …, LOCAL7) and severities (EMERG, ALERT, CRIT, ERR, WARN, NOTICE, INFO, DEBUG).\n- **RFC 3164-Style Header**: Optional inclusion of a timestamp (`Mmm dd hh:mm:ss`), hostname, and application tag in each message.\n- **Configurable Defaults**: Instantiation parameters allow setting default facility code, program tag, hostname, and whether timestamps are included.\n- **Runtime Overrides**: Per-message overrides for tag, hostname, and timestamp inclusion in the `log()` call.\n- **Convenience Methods**: Shortcut methods (`alert()`, `critical()`, `error()`, `warning()`, `notice()`, `info()`, `debug()`) for each severity level.\n- **Context Manager Support**: The `UDPClient` implements `__enter__`/`__exit__` for use with Python’s `with` statement, ensuring sockets are closed automatically.\n- **Resource Cleanup**: Explicit `close()` method on `UDPClient` to free socket resources when done.\n\n## Background\nAn important part of creating IoT devices is the ability to gain observability through logging. One of the most widely-used methods of collecting logs from network devices is using syslog. This library can help when integrating logging capabilities in CircuitPython creations.\n\n## Dependencies\nThis module requires use of the [`socketpool`](https://docs.circuitpython.org/en/latest/shared-bindings/socketpool/index.html) library and the [`time`](https://docs.circuitpython.org/en/latest/shared-bindings/time/) module in CircuitPython for timestamp generation.\n\n## Requirements\nIn order to use this module, a remote syslog server is also necessary to accept remote messages.\n\n## API Reference\n\n### Facility Constants (RFC 3164)\n- `F_KERN`, `F_USER`, `F_MAIL`, `F_DAEMON`, `F_AUTH`, `F_SYSLOG`, `F_LPR`, `F_NEWS`,\n  `F_UUCP`, `F_CRON`, `F_AUTHPRIV`, `F_FTP`, `F_NTP`, `F_AUDIT`, `F_ALERT`, `F_CLOCK`,\n  `F_LOCAL0`-`F_LOCAL7`\n\n### Severity Constants (RFC 3164)\n- `S_EMERG`, `S_ALERT`, `S_CRIT`, `S_ERR`, `S_WARN`, `S_NOTICE`, `S_INFO`, `S_DEBUG`\n\n## Limitations\n- No TCP transport or acknowledgment of receipt.\n- Structured data (RFC 5424) is not supported.\n- Timestamps are local and require a synchronized RTC or NTP on the device.\n\n## Reference Material\n- **RFC 3164**: The BSD Syslog Protocol\n- **CircuitPython `socketpool`** documentation\n- **CircuitPython `time`** documentation\n\n## Disclaimer\nThis library is probably unstable and full of bugs. Like everything else on the internet, run/use at your own risk.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fageagainstthemachine%2Fcircuitpython-usyslog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fageagainstthemachine%2Fcircuitpython-usyslog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fageagainstthemachine%2Fcircuitpython-usyslog/lists"}