vlog.h 647 B

12345678910111213141516171819202122
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. #ifndef CARBON_COMMON_VLOG_H_
  5. #define CARBON_COMMON_VLOG_H_
  6. #include "common/vlog_internal.h"
  7. namespace Carbon {
  8. // Logs when verbose logging is enabled (vlog_stream_ is non-null).
  9. //
  10. // For example:
  11. // CARBON_VLOG() << "Verbose message";
  12. #define CARBON_VLOG() \
  13. (vlog_stream_ == nullptr) ? (void)0 \
  14. : CARBON_VLOG_INTERNAL_STREAM(vlog_stream_)
  15. } // namespace Carbon
  16. #endif // CARBON_COMMON_VLOG_H_