Chrome OS log redirection, log upload and chrome app log

33 views
Skip to first unread message

Chunxiao Diao

unread,
Nov 4, 2016, 5:56:51 PM11/4/16
to Chromium OS dev
Hi,

I have some questions about logging on chrome os.

1. Does chrome os have any support for log redirection? 
Our current devices use rsyslog (e.g if $programname == 'rsyslogd' then -/var/log/user.log) to redirect our logs.
I wonder if Chrome OS has rsyslog or any equivalent.

2. How to specify files to be included in log upload.
Is there a way to specify what log files to be included to the file uploads? If we can redirect our logs, we hope all of them will be uploaded.

3.Kiosk app logging.
Is there any way for a kiosk app to write logs to somewhere that can be included in the log updates?

Thanks in advance. 



Mike Frysinger

unread,
Nov 4, 2016, 6:26:44 PM11/4/16
to Chunxiao Diao, Chromium OS dev
(1) CrOS uses rsyslog already -- see /etc/rsyslog.chromeos on the device, and /etc/rsyslog.d/, and /etc/init/syslog.conf
(2) what log upload are you referring to ?
(3) if kiosk is offloading standard logs, then just using normal syslog calls will go to /var/log/messages which probably gets offloaded
-mike

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en


Chunxiao Diao

unread,
Nov 10, 2016, 1:05:54 PM11/10/16
to Chromium OS dev, cd...@google.com
Thanks Mike for the help.

For (2): I'm talking about the periodic log uploads, which show up in the enterprise management console.
For (3): I'm quite new on chrome app development and I didn't find any API that does syslog. Is there a pointer for the API? 

Mike Frysinger

unread,
Nov 10, 2016, 3:46:17 PM11/10/16
to Chunxiao Diao, Chromium OS dev
if you want to use CrOS unmodified and you're just deploying a kiosk app, then there is (by design) no way to customize syslog/rsyslog behavior.  you can only do that if you're creating your own Chromium OS images.
-mike

Chunxiao Diao

unread,
Nov 11, 2016, 12:51:23 PM11/11/16
to Mike Frysinger, Chromium OS dev
We are creating our own overlay.

Would it be possible to configure log uploads behavior in this case? 

Mike Frysinger

unread,
Nov 11, 2016, 1:24:07 PM11/11/16
to Chunxiao Diao, Chromium OS dev
yes, you can install arbitrary rsyslog fragments into /etc/rsyslog.d/ as i mentioned earlier
-mike

Chunxiao Diao

unread,
Nov 14, 2016, 1:55:07 PM11/14/16
to Chromium OS dev, cd...@google.com
Great, thanks. Yeah I will use rsyslog to do log redirections. 

If I redirect some logs into /var/log/user.log (which does not exist now), will the newly created log files be automatically included in the log uploads? In the chrome device management console, if I go into Device Management > Chrome Devices > a device > System Activity and Troubleshooting, I can download recent system logs and both /var/log/messages and /var/log/net.log are included in the uploaded package. We wanted to be able to include newly created log files such as /var/log/user.log as well

Mike Frysinger

unread,
Nov 14, 2016, 5:17:27 PM11/14/16
to Chunxiao Diao, chromium-os-dev
sorry but I'm but familiar with the enterprise code paths
-mike
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages