Quantcast

irsend shows debug log despite lircd is run with --loglevel=warning

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

irsend shows debug log despite lircd is run with --loglevel=warning

David Kosir
Hi,

I'm running on master branch and using lirc with syslog.
This is line where I start lirc daemon:

lircd --device=/dev/lirc0 --output=/run/lircd --pidfile=/run/lircd.pid
--driver=default --loglevel=warning /etc/lircd.conf

And this is what I see in syslog:

Aug 25 17:29:32 lhb local0.info lircd-0.9.5-devel[666]: Info: lircd:
Opening log, level: Info
Aug 25 17:29:32 lhb local0.info lircd-0.9.5-devel[666]: Info: Initial
device: /dev/lirc0
Aug 25 17:29:32 lhb local0.info lircd-0.9.5-devel[666]: Info: Initial
device: /dev/lirc0
Aug 25 17:29:32 lhb local0.warn lircd-0.9.5-devel[666]: Warning:
lircd:  Opening log, level: Warning
Aug 25 17:29:32 lhb local0.warn lircd-0.9.5-devel[666]: Warning: Running as root

Now, when I run irsend:

irsend --count=1 --device=/run/lircd SEND_ONCE myremote power

syslog gets debug messages from irsend, but it shouldn't do so as only
warning or lower level should be sent to syslog:

Aug 25 17:30:45 lhb user.debug irsend: lirc_command_run: Sending:
SEND_ONCE myremote power
Aug 25 17:30:45 lhb user.debug irsend: lirc_command_run, state: 0,
input: "BEGIN"
Aug 25 17:30:45 lhb user.debug irsend: lirc_command_run, state: 1,
input: "SEND_ONCE myremote power"
Aug 25 17:30:45 lhb user.debug irsend: lirc_command_run, state: 2,
input: "SUCCESS"
Aug 25 17:30:45 lhb user.debug irsend: lirc_command_run, state: 3, input: "END"
Aug 25 17:30:45 lhb user.notice irsend: lirc_command_run: data:END, status:0

I guess that is a bug.

Cheers,
David

------------------------------------------------------------------------------
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: irsend shows debug log despite lircd is run with --loglevel=warning

Alec Leamas


On 25/08/16 17:43, David Kosir wrote:
> Hi,
Hi David!

>
> I'm running on master branch and using lirc with syslog.
> This is line where I start lirc daemon:
>
> lircd --device=/dev/lirc0 --output=/run/lircd --pidfile=/run/lircd.pid
> --driver=default --loglevel=warning /etc/lircd.conf
>
> And this is what I see in syslog:
>
> Aug 25 17:29:32 lhb local0.info lircd-0.9.5-devel[666]: Info: lircd:
> Opening log, level: Info
> Aug 25 17:29:32 lhb local0.info lircd-0.9.5-devel[666]: Info: Initial
> device: /dev/lirc0
> Aug 25 17:29:32 lhb local0.info lircd-0.9.5-devel[666]: Info: Initial
> device: /dev/lirc0
> Aug 25 17:29:32 lhb local0.warn lircd-0.9.5-devel[666]: Warning:
> lircd:  Opening log, level: Warning
> Aug 25 17:29:32 lhb local0.warn lircd-0.9.5-devel[666]: Warning: Running as root
>
> Now, when I run irsend:
>
> irsend --count=1 --device=/run/lircd SEND_ONCE myremote power
>
> syslog gets debug messages from irsend, but it shouldn't do so as only
> warning or lower level should be sent to syslog:
>
> Aug 25 17:30:45 lhb user.debug irsend: lirc_command_run: Sending:
> SEND_ONCE myremote power
> Aug 25 17:30:45 lhb user.debug irsend: lirc_command_run, state: 0,
> input: "BEGIN"
> Aug 25 17:30:45 lhb user.debug irsend: lirc_command_run, state: 1,
> input: "SEND_ONCE myremote power"
> Aug 25 17:30:45 lhb user.debug irsend: lirc_command_run, state: 2,
> input: "SUCCESS"
> Aug 25 17:30:45 lhb user.debug irsend: lirc_command_run, state: 3, input: "END"
> Aug 25 17:30:45 lhb user.notice irsend: lirc_command_run: data:END, status:0
>
> I guess that is a bug.
>
No, not really. It's a bit confusing though. Using irsend means using a
client-erver system. irsend, has it's own debug setting (and also
logfile) while lircd (the server) has another setting. They are really
not related

But while we are on it here is some kind of bug (or at least
shortcoming): irsend does not use the default options used by other
tools. In particular, there is no way actually set the irsend loglevel
from the command line. It doesn't pick up default values from
lirc_options.conf either. And it does not, like other tools, log
messages to file but uses syslog. All in all, there are reasons to patch
irsend to handle command line options in the same way as other tools.
OTOH, irsend is sort of "frozen" (a successor is underway), so the basic
message on is the dreaded "patches welcome".


Cheers!

--alec

------------------------------------------------------------------------------
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: irsend shows debug log despite lircd is run with --loglevel=warning

Bengt Martensson-2
On 08/29/16 11:17, Alec Leamas wrote:

>
>
> On 25/08/16 17:43, David Kosir wrote:
>> Hi,
> Hi David!
>>
>> I'm running on master branch and using lirc with syslog.
>> This is line where I start lirc daemon:
>>
>> lircd --device=/dev/lirc0 --output=/run/lircd --pidfile=/run/lircd.pid
>> --driver=default --loglevel=warning /etc/lircd.conf
>>
>> And this is what I see in syslog:
>>
>> Aug 25 17:29:32 lhb local0.info lircd-0.9.5-devel[666]: Info: lircd:
>> Opening log, level: Info
..
>> I guess that is a bug.
>>
> No, not really. It's a bit confusing though. Using irsend means using a
> client-erver system. irsend, has it's own debug setting (and also
> logfile) while lircd (the server) has another setting. They are really
> not related

No, really not. The explanation of the "why" is correct, but: irsend is
a small user invoked program. It should NOT send debugging information
to the syslog, which is there for logging the system and ITS processes.

irsend is really not a complicated thing. IrScrutinizer contains a GUI
version of it in pure Java (not supporting the named piped, only the TCP
socket, though). There is also a command line interface.

Greetz,

Bengt


------------------------------------------------------------------------------
Loading...