Location of legato app logs


#1

Dear Community,

Does anybody know where are the live syslogs for legato?
To my understanding it should be in “/tmp/legato_logs” but it is not there. Am i missing something?

Thanks
tom


#2

Hiya,

The log implementation on the stock WP85 distribution uses the Busybox syslog daemon, and stores the logs to a circular buffer in RAM. Off the top of my head, the RAM buffer is about 200k in size, so as not to fill up the memory of the WP85.

You can get a continuous running display of the log (similar to tail -f /var/log/kern.log on a Ubunu system) by opening a separate SSH console window and using the command

logread -f

I did a Legato app some time ago that runs in the background and copies the log to timestamped, hourly files on an external USB flash drive … but I haven’t updated it to use 17.06 yet.

ciao, Dave


#3

Hello Dave,

Thanks for your answer. Yes i know about the logread command and my issue is not so important. I just wanted to give the log as input to a log viewer like otros (https://github.com/otros-systems/otroslogviewer) . It can ssh into the device and read the log.

The /tmp/ directory is actually in RAM. I found this entry “/tmp/legato_logs” in some config file so it would be logical to be there but it is not. :slight_smile: But as i said it is not so important and with workaround no problem at all but it is strange that it is not there.

Cheers,
tom


#4

Hiya,

As far as I’m aware, by default the logs are only stored in RAM, not even in a tmp file. The only way to get them is to use the logger application.

You could use a remote SSH command (or maybe socat?) to grab the output and continuously pass it across a network pipe to your host machine.

Or … you could change the configuration of the logger to send the commands to a remote syslog server. The WP uses the syslogd from busybox and apparently it can do that. I would strongly recommend not configuring syslogd to write to a local file on the WP - you could either run out of RAM or FLASH; or worse wear out the FLASH.

ciao, Dave