Perfect! It works

global( debug.whitelist="on"
            debug.files=["mmkubernetes.c"])

Thanks a lot.

On Mon, Apr 26, 2021 at 1:29 PM Rainer Gerhards <[email protected]>
wrote:

> Have a look here:
>
> https://github.com/rsyslog/rsyslog/blob/master/tests/imfile-symlink.sh#L18
>
> This is from the testbench and uses what you want.
>
> HTH
> Rainer
>
> El sáb, 24 abr 2021 a las 20:27, rajeshksv via rsyslog
> (<[email protected]>) escribió:
> >
> > Hi All,
> >
> > I am trying to debug why rsyslog (v8.2012.0) is suddenly getting killed
> in
> > our Kubernetes cluster (running as daemonset pod). When I enable
> debugging
> > mode in rsyslog, it prints a lot of output. I am trying to limit rsyslog
> > Debug output to a source file (contrib/mmkubernetes/mmkubernetes.c) using
> > "FileTrace" but it doesn't seem to be working. How do I use that option
> or
> > are there any other ways to limit rsyslog debug output ?
> >
> > Here is what I have tried so far,
> >
> > To enable debugging in rsyslog, I have set following env vars
> > RSYSLOG_DEBUGLOG
> > RSYSLOG_DEBUG
> >
> > From documentation
> > <https://www.rsyslog.com/doc/master/troubleshooting/debug.html>,  I
> could
> > see that RSYSLOG_DEBUG supports "FileTrace" option which would limit
> > debugging output to some files. I tried setting FileTrace and/or
> > LogFuncFlow, but its not working
> >
> > export RSYSLOG_DEBUGLOG="/tmp/logs"
> > export RSYSLOG_DEBUG="Debug FileTrace=vm.c NoStdOut"
> > /usr/sbin/rsyslogd -n
> >
> >
> > > *rsyslogd 8.2004.0.11. error: invalid debug option 'FileTrace=vm.c' -
> > > ignored*rsyslogd: parameters for built-in module builtin:omfwd already
> > > set - ignored  [v8.2004.0.11. try https://www.rsyslog.com/e/2220 ]
> >
> >
> > I tried help to see options it supports, surprisingly FileTrace isn't
> > supported.
> > export RSYSLOG_DEBUG="Debug help"
> >
> > rsyslogd 8.2004.0.11. runtime debug support - help requested, rsyslog
> > > terminates
> > > environment variables:
> > > additional logfile: export RSYSLOG_DEBUGFILE="/path/to/file"
> > > to set: export RSYSLOG_DEBUG="cmd cmd cmd"
> > > Commands are (all case-insensitive):
> > > help (this list, terminates rsyslogd)
> > > NoLogTimestamp
> > > Nostdout
> > > OutputTidToStderr
> > > DebugOnDemand - enables debugging on USR1, but does not turn on output
> > > See debug.html in your doc set or https://www.rsyslog.com for details
> >
> >
> > I tried digging source code
> > <https://github.com/rsyslog/rsyslog/blob/v8.2012.0/runtime/debug.c> - I
> > couldn't find any trace of FileTrace
> >
> > Hence my Question is - Is FileTrace supported ? If yes, how to use it or
> > are there any other ways to limit Rsyslog Debug output to source file
> > (Ex: contrib/mmkubernetes/mmkubernetes.c)
> >
> > --
> > Regards,
> > Rajesh KSV
> > _______________________________________________
> > rsyslog mailing list
> > https://lists.adiscon.net/mailman/listinfo/rsyslog
> > http://www.rsyslog.com/professional-services/
> > What's up with rsyslog? Follow https://twitter.com/rgerhards
> > NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad
> of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you
> DON'T LIKE THAT.
>


-- 
Regards,
Rajesh KSV
_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to