[syslog-ng] Is it possible to create Two instances of syslog-ng engine ?
antal.nemes at oneidentity.com
Mon May 13 06:57:14 UTC 2019
> 1)What is pattern_db_global_init, 'patterndb = pattern_db_new()',
'pattern_db_reload_ruleset', 'pattern_db_set_emit_func' doing in the
following case ?
I am afraid there is no one can give you better understanding about these
than yourself. Read the source, Luke!
> 2)Can I make two independent instances of syslog-ng engines?
Engine can mean a lot of things. With much of oversimplification, here is
my understanding of syslog-ng. The syslog-ng message handling is built
around a directed (acyclic) graph, where the nodes are from class LogPipe.
Pipes without incoming arcs are called sources. Pipes without outgoing arcs
are the destinations. Other nodes might be filters or parsers.
None of them can stand on their own. Some of them needs a worker thread in
order to work, like sources and destinations. Filters and parsers do not
own a worker thread, they are executed by some source thread they are
connected to (determined by the graph). You can have any number of LogPipes
in a single application. If you need worker threads, syslog-ng can provide
them too: see mainloop.h, mainloop-worker.h. Single instance of MainLoop
can provide you any number of worker threads. Or you can use your own
> 3)How can I call two instances of syslog-ng engines independently from my
I am not familiar with go, but there must be some eventoop library for it.
Or you can try to use MainLoop. Or if all fails, there must be a fork()
system call exposed in go.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the syslog-ng