Code Monkey home page Code Monkey logo

Comments (5)

algernon avatar algernon commented on August 15, 2024

How about this:

perl(
  queue-func("queue", es_index("syslog-$YEAR.$MONTH.$DAY"), es_type("syslog"))
);

And if you want to force a type, then es_type(string("syslog")) would also work. This seems more natural than using pair(), but has the drawback of not having the whole value-pairs infrastructure underneath exposed (so you can't do key("es_*") for example).

from syslog-ng-incubator.

faxm0dem avatar faxm0dem commented on August 15, 2024

that looks right to me, and I'd need the same for init-func and deinit-func

from syslog-ng-incubator.

algernon avatar algernon commented on August 15, 2024

Yeah, I'd do it in a general way, so the same stuff can be reused for other *-func() options, in all relevant drivers. (This will take some time, though, as 3.5.5 is a much higher priority task at the moment).

from syslog-ng-incubator.

talien avatar talien commented on August 15, 2024

For init-func, and deinit func i wouldn't do the same, because at init-time and deinit-time there is no message, on which you can apply your template. That's why we use constant globals in lua, for example. I would use the lua-style config in all scripted destinations. We will see if the semantics will differ, or we can unify them, too. (In lua, you cannot use named parameters from C, only positional ones, but in python, you can do something like that. Every language has some dict/hash/table-like structure, so I would go for that direction for scripted destinations).

from syslog-ng-incubator.

algernon avatar algernon commented on August 15, 2024

Yeah, for init/deinit, it wouldn't be a template. But similar syntax. How it gets pushed down to the interpreter, is another matter.

from syslog-ng-incubator.

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.