Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: shill_logging.h

Issue 6575006: Add initial sketch to shill repository (Closed) Base URL: ssh://git@gitrw.chromium.org/shill.git@master
Patch Set: A few object renames and pointer conversions Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « shill_event.cc ('k') | shill_logging.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #include <glog/logging.h>
2
3 #define SHILL_LOG_DAEMON 1
4 #define SHILL_LOG_CONFIG 2
5 #define SHILL_LOG_EVENT 4
6 #define SHILL_LOG_DBUS 8
7 #define SHILL_LOG_MANAGER 16
8 #define SHILL_LOG_SERVICE 32
9 #define SHILL_LOG_DEVICE 64
10 #define SHILL_LOG_ALL ~0
11
12 #define SHILL_LOG(level, flags) LOG_IF(level, shill::Log::IsEnabled(flags))
13
14 #define SHILL_LOG_FILE "/tmp/shill_daemon.log"
15
16 namespace shill {
17 class Log {
18 public:
19 static void Enable(uint32_t flags) { flags_ |= flags; }
20 static void Disable(uint32_t flags) { flags_ &= ~flags; }
21 static inline bool IsEnabled(uint32_t flags) { return (flags_ & flags) != 0; }
22
23 private:
24 static uint32_t flags_;
25 };
26 } // namespace shill
OLDNEW
« no previous file with comments | « shill_event.cc ('k') | shill_logging.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698