Coder Social home page Coder Social logo

Comments (2)

poettering avatar poettering commented on August 26, 2024

Frankly, I am not convinced we should really beef up the forward-to-syslog stuff, because it has the major issue that there's no buffering, i.e. you can never catch up, anything listening will not be able to catch up with what was logged before it started listening.

The various syslog implementations I am aware of nowadays have plugins to read the data they need directly from the journal, and that does provide the buffering so that they can catch up with what was logged while they were offline.

I think rather then beefing this concept up we probably should deprecate it instead, i.e. keep it around and working as it is now, but drop it from the docs, and hide it in the default .conf file we install.

from systemd.

cipriancraciun avatar cipriancraciun commented on August 26, 2024

Indeed, the syslog protocol and implementations has all the issues you've mentioned (and perhaps more).

However, it is also a reasonably simple protocol to implement, and thus there are many small (non-enterprise-ish) tools out there that do implement it (and for which it wouldn't be feasible to implement systemd support).

Thus, having support for it (both in the RFC-3164 and RFC-5424 variants) could offer an easy escape hatch for those that need it, without too much overhead on either side.


For example, in my particular use-case, I have written myself a small Go-based syslog server that just stores logged messages in archived (xz / zstd) files. (I know it's not 100% reliable and it might miss messages due to UDP packets drops or in the time it is down, but that is fine.) I use it primarily for HAProxy request logs, but now I have added MQTT support to it for live-watching-filtering of logs when I need them. So, I wanted to also feed in the system log, where I have already configured everything to properly log to journald.

I could for example try to support the journald natively (either via the export format, or reading the log files), however that has two major downsides:

  • most implementations for Go rely on the C library that systemd provides; thus linking to them would mean I no longer get easy cross-compilation from Go native build tools; (I now get statically linked binaries;)
  • adding support for journald adds lots of complexity (as compared to syslog that I already support); (thus for the moment I'll just patch the code to support the old RFC-3164 format for this socket;)

What I describe here might be viewed as a "me" problem, which I can easily work-around. However this is just an use-case for supporting syslog (and the RFC-5424 format). There might be other similar use-cases out there.


I think rather then beefing this concept up we probably should deprecate it instead, i.e. keep it around and working as it is now, but drop it from the docs, and hide it in the default .conf file we install.

I think that would lead to even more perceived lock-in from the systemd ecosystem... (Which I think we already have enough...)

from systemd.

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.