GithubHelp home page GithubHelp logo

Comments (3)

bazsi avatar bazsi commented on July 20, 2024

hmm... yup, that NULL setting is incorrect. it has been a performance
optimization (and probably premature at that).

Probably, way earlier the source driver didn't do anything but forward the
message, now it has some actual functionality. The entire NULL stuff could
probably be removed, I doubt it'd have any kind of measurable performance
drop. and if that would happen, I would go to the configuration compiler to
optimize the tree instead of trying to microoptimize function calls.

On Mon, Aug 4, 2014 at 2:34 PM, Gergely Nagy [email protected]
wrote:

Assuming I have this configuration:

@Version: 3.5
source s_foo { tcp(port(12345)); };
log { source(s_foo); destination { file("/dev/stdout", template("SRC: $SOURCE\n")); }; };

If I send a log message, $SOURCE will not be set, and stats for the
center counter will not be incremented, either. This is because in
afsocket_sd_init_instance()
https://github.com/balabit/syslog-ng/blob/416d3159c133a99134cf75607b74b2650cb73688/modules/afsocket/afsocket-source.c#L679,
we explicitly set the queue method to NULL, which will then fall back to
log_pipe_forward_msg(), which does not set SOURCE, nor does it increment
the center counter.

My first idea would be to remove that line, and have
log_src_driver_queue_method() do its thing. But I am unsure about the
implications.

@bazsi https://github.com/bazsi: Any insight?

(Thanks @faxm0dem https://github.com/faxm0dem for the report!)


Reply to this email directly or view it on GitHub
#186.

from syslog-ng.

algernon avatar algernon commented on July 20, 2024

Thanks! That was my suspicion too. Will requeue this for 3.6 though, as the problem has not been reported until now (it was broken for a good while now), and this may break existing scripts when fixed.

Btw, I just checked, and in versions prior a24a380, it was, indeed, set to log_pipe_forward_msg(), and that commit turned it into a NULL. Sometime after, in 0e858cb, log_src_driver_queue_method() was changed. So this has been broken since 3.4 alpha, roughly.

from syslog-ng.

algernon avatar algernon commented on July 20, 2024

I'm checking the code, and it seems that it's not only afsocket that is affected. The file() source does not go through log_src_driver_queue_method() either. streams() and program() sources appear to be unaffected.

from syslog-ng.

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.