logging.gni 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. # Copyright 2019 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//build/buildflag_header.gni")
  5. import("//build/config/chromeos/ui_mode.gni")
  6. import("//build/config/dcheck_always_on.gni")
  7. declare_args() {
  8. # Use LogErrorNotReached() for NOTREACHED().
  9. enable_log_error_not_reached =
  10. is_chromeos_ash && !(is_debug || dcheck_always_on)
  11. enable_stack_trace_line_numbers = false
  12. # Use runtime vlog everywhere except for ash-chrome.
  13. # When `use_runtime_vlog` is true,
  14. # command line switch `--vmodule=xxx` or `--v=x` could be used to
  15. # control vlog level at runtime.
  16. # when `use_runtime_volog` is false,
  17. # verbose log level is controlled by `ENABLE_VLOG_LEVEL` macro. VLOG(n)
  18. # is kept and generate output if `n` is less than or equal to the vlog
  19. # level defined by the macro.
  20. # Command line switch `--vmodule=xxx`, or `--v=x` would have no effect.
  21. #
  22. # Runtime vlog is used everywhere except on ash-chrome.
  23. # Ash-chrome has a few vmodule patterns that need to be used indefinitely
  24. # to investigate problems from logs in feedback reports. These vmodule
  25. # patterns are using too much cpu cycles (see http://crbug/489441). Turning
  26. # off runtime vlog and using build time vlog would avoid paying that cpu tax
  27. # and have a nice side effect of a smaller production binary.
  28. use_runtime_vlog = !is_chromeos_ash
  29. }