/var/log/ui vs /var/log/chrome

223 views
Skip to first unread message

Adrian Elder

unread,
Dec 20, 2017, 12:20:33 PM12/20/17
to Chromium OS dev, Simon Que
Does /var/log/chrome/chrome contain a superset of things from /var/log/ui/ui.LATEST?
Is there a doc where I can learn more about the differences between these two logs?

I came this question by noting that lines like the following are logged in /var/log/chrome but not in /var/log/ui. On a Non-ChromeOS Linux Device, I see these in chrome_debug.log.

[1:6331:1218/122249.888257:WARNING:media_stream_audio_processor.cc(856)] Large audio delay, capture delay: 424ms; render delay: 0ms

Daniel Erat

unread,
Dec 20, 2017, 5:39:35 PM12/20/17
to Adrian Elder, Chromium OS dev, Simon Que
I could've sworn that this was documented somewhere, but I'm not having any luck finding it now. I've written a quick doc that's up for review at https://crrev.com/c/837587. Here's the relevant bit (in markdown):

---

Messages written via the logging macros in [base/logging.h] end up in different
locations depending on Chrome's state:

* `/var/log/ui/ui.LATEST` contains data written to stdout and stderr by Chrome.
  This generally comprises messages that are written very early in Chrome's
  startup process, before logging has been initialized.
* `/var/log/chrome/chrome` contains messages that are written at the login
  screen before a user has logged in.
* `/home/chronos/user/log/chrome` contains messages that are written while a
  user is logged in. Note that this path is within the user's encrypted home
  directory and is only accessible while the user is logged in.

All of the above files are actually symlinks. Older log files can be found
alongside them in the same directories.

Also notable is `/var/log/messages`. This file contains general syslog messages,
but it also includes messages written by `session_manager` that may be useful in
determining when or why Chrome started or stopped.

--
--
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


Adrian Elder

unread,
Dec 20, 2017, 6:16:33 PM12/20/17
to Daniel Erat, Chromium OS dev, Simon Que
Thanks for updating the docs!

I'm only a little confused by this description of /var/log/chrome/chrome. Looking at logs on an enterprise managed device running with a robot account (a Chromebox for Meetings device) I see lots of logging activity in /var/log/chrome/chrome after the robot account has logged in.

Daniel Erat

unread,
Dec 20, 2017, 6:27:54 PM12/20/17
to Adrian Elder, Chromium OS dev, Simon Que
Hmm, I'm not sure about that. I think that the relevant code for switching log files is at chrome/browser/chromeos/logging.cc.

Adrian Elder

unread,
Dec 20, 2017, 7:07:35 PM12/20/17
to Daniel Erat, Chromium OS dev, Simon Que
Looking at the code, I don't see any way that it could have, but is there any way that kDisableLoggingRedirect is enabled for test images by default? I'm looking at a device running a test image.

Luigi Semenzato

unread,
Dec 20, 2017, 7:15:01 PM12/20/17
to Adrian Elder, Daniel Erat, Chromium OS dev, Simon Que
No, that's not it. The test images log in
/home/chronos/user/log/chrome when someone is logged on.

Daniel Erat

unread,
Dec 21, 2017, 3:33:08 AM12/21/17
to Luigi Semenzato, Adrian Elder, Chromium OS dev, Simon Que
Are you seeing this while Autotest-based tests are running (or after running a test)? Telemetry/Catapult uses --disable-logging-redirect when it restarts Chrome.

(ps should tell you whether the flag is present.)

Adrian Elder

unread,
Dec 21, 2017, 10:23:33 AM12/21/17
to Daniel Erat, Luigi Semenzato, Chromium OS dev, Simon Que
No autotest. Running ChromeOS 9901.77.0 / Chrome 62.0.3202.97 on a buddy.

Flags from ps:

/opt/google/chrome/chrome
  --ppapi-flash-path=/opt/google/chrome/pepper/libpepflashplayer.so
  --ppapi-flash-version=27.0.0.187
  --ui-prioritize-in-gpu-process
  --use-gl=egl
  --enable-native-gpu-memory-buffers
  --gpu-sandbox-failures-fatal=yes
  --enable-logging
  --log-level=1
  --use-cras
  --enable-wayland-server
  --user-data-dir=/home/chronos
  --max-unused-resource-memory-usage-percentage=5
  --system-developer-mode
  --disable-lock-screen-apps
  --login-profile=user
  --has-chromeos-keyboard
  --default-wallpaper-large=/usr/share/chromeos-assets/wallpaper/oem_large.jpg
  --default-wallpaper-small=/usr/share/chromeos-assets/wallpaper/oem_small.jpg
  --default-wallpaper-is-oem
  --guest-wallpaper-large=/usr/share/chromeos-assets/wallpaper/guest_large.jpg
  --guest-wallpaper-small=/usr/share/chromeos-assets/wallpaper/guest_small.jpg
  --enable-consumer-kiosk
  --enterprise-enrollment-initial-modulus=15
  --enterprise-enrollment-modulus-limit=19
  --login-manager
  --first-exec-after-boot
  --vmodule=tablet_power_button_controller=1,*chromeos/login/*=1,auto_enrollment_controller=1,*plugin*=2,*zygote*=1,*/ui/ozone/*=1,*/ui/display/manager/chromeos/*=1,power_button_observer=2,webui_login_view=2,lock_state_controller=2,webui_screen_locker=2,screen_locker=2

David Riley

unread,
Dec 21, 2017, 1:28:25 PM12/21/17
to Adrian Elder, Daniel Erat, Luigi Semenzato, Chromium OS dev, Simon Que
I'll jump on this thread to plug the merge_logs script (https://chromium.googlesource.com/chromiumos/chromite/+/master/scripts/merge_logs.py) which should combine logs in chronological order from multiple files for a single view, handling most/all the different date formats used in the various log files.

(Resent from correct email address for list.)

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages