Comments (10)
I've made appender based on libc's syslog() function: https://crates.io/crates/log4rs-syslog. It supports only linux and other unix-like systems (tested on macOS). Maybe someone will find it useful.
from log4rs.
I've implemented the base functionality of the syslog appender. It supports plain and RFC 5424 messages and UDP/TCP protocols for now but can be easily extended by providing the RFC 3164 format support and unix sockets as a transport protocol option. I'll get back to these features shortly.
Any feedback on the code as well as on the documentation will be highly appreciated.
from log4rs.
RFC 3164 support is ready. Added to the same PR.
from log4rs.
It seems that there is no respond from log4rs-syslog , could you add syslog support directly into this crate? @estk
from log4rs.
I don't know of anything that will currently hit syslog, but it should be easy to make. I think it'd probably make sense to build in a 3rd party crate for now - we can always merge it in later.
from log4rs.
@im-0 If you're interested in merging log4rs-syslog into log4rs I'd be interested in helping with the effort. (Obviously behind a feature flag)
from log4rs.
@zonyitoo I'd love to have that functionality, but i dont have time to implement it personally. if youd like to submit a PR i would be happy to assist.
from log4rs.
Would you mind copy-and-paste log4rs-syslog? I works well with 0.13.
If it is ok, I could make a PR like that. But it would be better to ask @im-0 again.
from log4rs.
Any updates on getting syslog functionality to log4rs since the last post 3 year ago? It seems was an implementation in #26 ~8 years ago, but then that never got merged because there "had to be a better way" than to duplicate the code from rust-syslog.
But since then progress stalled besides the mentioned log4rs-syslog, but that's not a full implementation, but a thin wrapper around libc's syslog() function.
What would be the best way to implement a cross platform network syslog backend for log4rs?
Make a new separate crate log4rs-syslog-native similar to rust-syslog? Or pull request to log4rs?
And then instead of calling syslog()
- either base the implementation on #26
- copy or call the implementation from the MIT licensed rust-syslog crate (relevant code probably less than 500 LOC)?
- or reimplement it again?
PS: Any ideas about supporting RELP?
from log4rs.
@kwinz I'd be interested in merging log4rs-syslog in. Do you see a better way to do it with option 2 by using rust-syslog? I think we should start with syslog and then move to support RELP with a similar model.
from log4rs.
Related Issues (20)
- Publish on crates.io HOT 2
- Do you use any optimisations to log in file?
- README out of date with the 1.0 version HOT 2
- Clippy fails with log4rs HOT 2
- Resolve Deprecated Chrono API
- Refactor COLOR_MODE to OnceCell
- Increase test coverage across all modules HOT 1
- TimeTriggerConfig pub HOT 2
- Logging pattern does not depict logs as I declared it HOT 3
- How to config with tokio_tracing HOT 1
- bug: Cannot compile on Apple Silicon (arm64) - symbol not found for architecture arm64 HOT 2
- Timestamps assume UTC timezone in docker containers, ignoring TZ variable HOT 1
- Codecov action out of date HOT 1
- Integrate Syslog Appender HOT 3
- Make `RawConfig` serializeable HOT 11
- compile failed on mac HOT 3
- How to set up rolling by day HOT 1
- Questions about log rolling_file HOT 3
- Logger stops logging after some time
- File/Rolling File appender doesn't guard against symlink attacks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from log4rs.