Code Monkey home page Code Monkey logo

Comments (10)

im-0 avatar im-0 commented on July 17, 2024 3

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.

alygin avatar alygin commented on July 17, 2024 1

#26

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.

alygin avatar alygin commented on July 17, 2024 1

RFC 3164 support is ready. Added to the same PR.

from log4rs.

sfackler avatar sfackler commented on July 17, 2024

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.

estk avatar estk commented on July 17, 2024

@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 avatar zonyitoo commented on July 17, 2024

It seems that there is no respond from log4rs-syslog , could you add syslog support directly into this crate? @estk

from log4rs.

estk avatar estk commented on July 17, 2024

@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.

zonyitoo avatar zonyitoo commented on July 17, 2024

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.

kwinz avatar kwinz commented on July 17, 2024

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.

bconn98 avatar bconn98 commented on July 17, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.