Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to capture the logs for a certain bug I'm having with Google Chrome. However, I can't find/enable logs for GC.

According to this Chromium project page, I just need to add the flags --enable-logging --v=1 and a chrome_debug.log file will appear in my user data directory. However, after running GC (and closing through the 'X' title bar button) there is no chrome_debug.log file in the specified directory. I even tried running as root as it may have something to do with write permissions but GC refuses to start as root.

Another thing, GC also prints messages when invoked from command line. I tried capturing this and redirecting them to a file via $ google-chrome > today.log but the messages are still printed in the command line and the file I specify gets created but remains empty.

Note that I can't just copy-paste the messages printed on terminal after my bug occurs as the bug freezes up my whole system that, when it occurs, my only option is to turn off my computer straight via the power button. I've seen a few similar bugs already posted but I find that they don't exactly describe my situation so I'd really like to get some logs for this.

So how do I enable logging or, at least, get those terminal messages in a file?

share|improve this question
    
I just tried google-chrome --enable-logging --v=1 and I do see /home/vasa1/.config/google-chrome/chrome_debug.log. This is with the latest Chrome stable and Lubuntu 12.10. –  user25656 Jan 5 '13 at 6:44
    
Meh...now that I checked manually, there it is indeed. I was doing locate *.log | grep chrome where it doesn't turn up, even after updatedb. Question closed. Thanks. –  skytreader Jan 5 '13 at 6:54

2 Answers 2

up vote 0 down vote accepted

It seems likely that you're not looking in the right place for the log file.

When you run google-chrome --enable-logging --v=1, the log file will be created inside ~/.config/google-chrome (where ~ represents your home folder). If you're using Nautilus (the graphical file browser), you'll have to press Ctrl+H or click View > Show Hidden Files to see files and folders that start with ., such as the .config folder.

Or, if you're using Chromium rather than Chrome and you run chromium-browser --enable-logging --v=1, the log file will be created inside ~/.config/chromium.

If you want to send all the output of a command to a file, including error output, use the &> redirection operator instead of just >. So you could run google-chrome &> output.txt.

share|improve this answer
    
Yah. I didn't look manually but used locate which wasn't able to find it (see my comment above). Thanks. –  skytreader Jan 5 '13 at 6:55

I just tried this and to save the console output that shows up on the terminal you have to use BOTH the --enable-logging --v=1 command switch and the &>log.txt redirect.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.