转自: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

 
  • This will turn on full logging support (INFO, WARNING, ERROR, and VERBOSE0 for >=M9).
  • Verbose logging shows up with their own VERBOSEn label.
    • --vmodule enables verbose logging on a per module basis. Details in base/logging.h.
  • Most logs that used to be INFO have been moved to use verbose logging.
  • Any page load (even the new tab page) will print messages tagged with VERBOSE1; for example:
  • [28304:28320:265508881314:VERBOSE1:chrome/browser/renderer_host/resource_dispatcher_host.cc(1098)] OnResponseStarted: chrome://newtab/
  • The output will be saved to the file chrome_debug.log in Chrome's user data directory (in the parent directory of Default/) for a release build, and in the binary build folder (e.g. out\Debug) for a debug build. On Chrome OS, messages logged by Chrome are written to files within /var/log/chrome at the login screen and to files within the log subdirectory under the logged-in user's encrypted home directory, which resides under/home/chronos.
  • With --enable-logging=stderr the output will be printed to standard error (not available on Windows)
  • This file is overwritten each time you restart chrome.
  • To enable logging from the render processes on Windows you also need the --no-sandboxcommand line flag.
     
  • To see WTF_LOG, use --blink-platform-log-channels
Note that:
  • The location of Chrome's user data directory depends on your operating system, and whether you are using Chrome vs Chromium.
  • The above document lists the path to the Default/ directory; the chrome_debug.log file we are interested in is actually one directory above this (i.e. the parent directory)
  • If the environment variable CHROME_LOG_FILE is set, Chrome will write its debug log to its specified location.  Example: Setting CHROME_LOG_FILE to "chrome_debug.log" will cause the log file to be written to the Chrome process's current working directory while setting it to "D:\chrome_debug.log" will write the log to the root of your computer's D: drive.
  • To override the log file path in a test harness that runs Chrome, use this pattern:
    #include "chrome/common/env_vars.h"
    ...
    // Set the log file path in the environment for the test browser.
    std::wstring log_file_path = ...;
    SetEnvironmentVariable(env_vars::kLogFileName, log_file_path.c_str());

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

Sawbuck

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.

How to enable logging的更多相关文章

  1. openstacksdk enable logging

    http://git.openstack.org/cgit/openstack/python-openstacksdk/tree/doc/source/users/guides/logging.rst

  2. Logging的这点小事

    真正做项目,才发觉Logging的好处和学问.自己胡搞的时候,常常使用System.out.println作为输出. 但实际的项目,尤其是library比较多的时候,好好配置好Logging,才能在后 ...

  3. [转]Configure logging in SSIS packages

    本文转自:http://learnsqlwithbru.com/2009/11/26/configure-logging-in-ssis-packages/ n this article we wil ...

  4. [转]Code! MVC 5 App with Facebook, Twitter, LinkedIn and Google OAuth2 Sign-on (C#)

    本文转自:https://www.asp.net/mvc/overview/security/create-an-aspnet-mvc-5-app-with-facebook-and-google-o ...

  5. 将asp.net core站点发布到IIS上遇到的问题

    今天第一次将整个 asp.net core 站点发布到 IIS 上,以前都是发布到 Linux 服务器上. 开始使用 dotnet publish -c release 命令发布,用浏览器访问站点时出 ...

  6. SSIS Data Flow 的 Execution Tree 和 Data Pipeline

    一,Execution Tree 执行树是数据流组件(转换和适配器)基于同步关系所建立的逻辑分组,每一个分组都是一个执行树的开始和结束,也可以将执行树理解为一个缓冲区的开始和结束,即缓冲区的整个生命周 ...

  7. Flume官方文档翻译——Flume 1.7.0 User Guide (unreleased version)(二)

    Flume官方文档翻译--Flume 1.7.0 User Guide (unreleased version)(一) Logging raw data(记录原始数据) Logging the raw ...

  8. ORACLE清理、截断监听日志文件(listener.log)

    在ORACLE数据库中,如果不对监听日志文件(listener.log)进行截断,那么监听日志文件(listener.log)会变得越来越大,想必不少人听说过关于"LISTENER.LOG日 ...

  9. redis配置详解

    ##redis配置详解 # Redis configuration file example. # # Note that in order to read the configuration fil ...

随机推荐

  1. TCP的那些事儿(上)

    TCP的那些事儿(上) 原文链接:http://coolshell.cn/articles/11564.html TCP是一个巨复杂的协议,因为他要解决很多问题,而这些问题又带出了很多子问题和阴暗面. ...

  2. 使用 PHP 和 Apache Solr 实现企业搜索

    原文链接:http://www.ibm.com/developerworks/cn/opensource/os-php-apachesolr/   http://blog.csdn.net/hzcyc ...

  3. c语言 函数传输传递的三种方式(值、指针、引用)

    本文摘自<彻底搞定c指针> 一.三道考题开讲之前,我先请你做三道题目.(嘿嘿,得先把你的头脑搞昏才行……唉呀,谁扔我鸡蛋?)考题一,程序代码如下:void Exchg1(int x, in ...

  4. dedecms升级后报错

    DedeCMS Error: (PHP 5.3 and above) Please set 'request_order' ini value to include C,G and P (recomm ...

  5. [原] Android performClick无效,UI线程理解

    原因 开发过程中遇到button.performClick()无效,原因是View.performClick()需要再UI线程中调用才会有效执行. 响应系统调用的方法(比如报告用户动作的onKeyDo ...

  6. socket基本

    fd_set用法: http://blog.sina.com.cn/s/blog_5c8d13830100erzs.htm socket连接: lpszHost="127.0.0.1&quo ...

  7. 微信智慧KTV上线 不怕周末订不到包厢了

    周末邀三五好友唱唱歌是件惬意的事,可订包厢是个烦心事,总是people mountain people sea,而且价格比平时高出不少.现在好了,微信智慧KTV上线了,将有效解决传统KTV收银时间集中 ...

  8. LVS负载均衡集群服务搭建详解(二)

    lvs-nat模型构建 1.lvs-nat模型示意图 本次构建的lvs-nat模型的示意图如下,其中所有的服务器和测试客户端均使用VMware虚拟机模拟,所使用的CentOS 7 VS内核都支持ipv ...

  9. Android自定义Dialog

    Android开发过程中,常常会遇到一些需求场景——在界面上弹出一个弹框,对用户进行提醒并让用户进行某些选择性的操作, 如退出登录时的弹窗,让用户选择“退出”还是“取消”等操作. Android系统提 ...

  10. android 初探

    2014年7月27日 15:02:57 附: android 官方培训课程中文版 //官方简单的入门教程, 每个大类中只介绍了几个知识点, 可以快速搭建一个hello world android 开发 ...