| | |
| | | #ifndef BASE_VLOG_IS_ON_H_ |
| | | #define BASE_VLOG_IS_ON_H_ |
| | | |
| | | #include <glog/log_severity.h> |
| | | |
| | | #include <cstddef> |
| | | |
| | | #include "glog/log_severity.h" |
| | | |
| | | #if defined(__GNUC__) |
| | | // We emit an anonymous static int* variable at every VLOG_IS_ON(n) site. |
| | |
| | | #define VLOG_IS_ON(verboselevel) \ |
| | | __extension__ \ |
| | | ({ static @ac_google_namespace@::SiteFlag vlocal__ = {NULL, NULL, 0, NULL}; \ |
| | | GLOG_IFDEF_THREAD_SANITIZER( \ |
| | | AnnotateBenignRaceSized(__FILE__, __LINE__, &vlocal__, sizeof(@ac_google_namespace@::SiteFlag), "")); \ |
| | | @ac_google_namespace@::int32 verbose_level__ = (verboselevel); \ |
| | | (vlocal__.level == NULL ? @ac_google_namespace@::InitVLOG3__(&vlocal__, &FLAGS_v, \ |
| | | __FILE__, verbose_level__) : *vlocal__.level >= verbose_level__); \ |
| | |
| | | SiteFlag* next; |
| | | }; |
| | | |
| | | // Helper routine which determines the logging info for a particalur VLOG site. |
| | | // Helper routine which determines the logging info for a particular VLOG site. |
| | | // site_flag is the address of the site-local pointer to the controlling |
| | | // verbosity level |
| | | // site_default is the default to use for *site_flag |