转自:https://www.chromium.org/for-testers/enable-logging
How to enable logging
To enable logging, launch Chrome with these command line flags:
--enable-logging --v=1
Note that:
How do I specify the command line flags?See this page.
What personal information does the log file contain?Before attaching your chrome_debug.log to a bug report, be aware that it can contain some personal information, such as URLs opened during that session of chrome.
Since the debug log is a human-readable text file, you can open it up with a text editor (notepad, vim, etc..) and review the information it contains, and erase anything you don't want the bug investigators to see.
The boilerplate values enclosed by brackets on each line are in the format:
[process_id:thread_id:ticks_in_microseconds:log_level:file_name(line_number)]
Alternatively to the above, you can use the Sawbuck utility (for Windows) to view, filter and search the logs in realtime, in a handy-dandy GUI.
First download and install the latest version of Sawbuck, launch it, then select "Configure Providers.." form the "Log" menu.
This will bring up a dialog that looks something like this:
Set the log level for Chrome, Chrome Frame, and/or the Setup program to whatever suits you, and click "OK". You can revisit this dialog at any time to increase or decrease the log verbosity.
Now select "Capture" from the "Log" menu, and you should start seeing Chrome's log messages.
Note that Sawbuck has a feature that allows you to view the call trace for each log message, which can come in handy when you're trying to home in on a particular problem.
Note: If you're installing Sawbuck for the first time, you may need to quit and relaunch your Chrome, as the logging transport used by Sawbuck is only enabled under an environment variable, which is set by the installer.
|