Home | History | Annotate | Download | only in brillo
      1 // Copyright 2015 The Chromium OS 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 
      5 #ifndef LIBBRILLO_BRILLO_LOCATION_LOGGING_H_
      6 #define LIBBRILLO_BRILLO_LOCATION_LOGGING_H_
      7 
      8 // These macros help to log Location objects in verbose mode.
      9 
     10 #include <base/logging.h>
     11 
     12 #define VLOG_LOC_STREAM(from_here, verbose_level)                          \
     13   logging::LogMessage((from_here).file_name(), (from_here).line_number(),  \
     14                       -(verbose_level)).stream()
     15 
     16 #define VLOG_LOC(from_here, verbose_level)                                 \
     17   LAZY_STREAM(VLOG_LOC_STREAM(from_here, verbose_level),                   \
     18               VLOG_IS_ON(verbose_level))
     19 
     20 #define DVLOG_LOC(from_here, verbose_level)                                \
     21   LAZY_STREAM(VLOG_LOC_STREAM(from_here, verbose_level),                   \
     22               ::logging::DEBUG_MODE && VLOG_IS_ON(verbose_level))
     23 
     24 #endif  // LIBBRILLO_BRILLO_LOCATION_LOGGING_H_
     25