Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3394127
D4132.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
906 B
Referenced Files
None
Subscribers
None
D4132.diff
View Options
diff --git a/services/tunnelbroker/src/server.cpp b/services/tunnelbroker/src/server.cpp
--- a/services/tunnelbroker/src/server.cpp
+++ b/services/tunnelbroker/src/server.cpp
@@ -35,11 +35,23 @@
AmqpManager::getInstance().connect();
}
+void InitLogging(const char *programName) {
+ FLAGS_logtostderr = true;
+ FLAGS_colorlogtostderr = true;
+ if (comm::network::tools::isDevMode()) {
+ // Log levels INFO, WARNING, ERROR, FATAL are 0, 1, 2, 3, respectively
+ FLAGS_minloglevel = 0;
+ } else {
+ FLAGS_minloglevel = 1;
+ }
+ google::InitGoogleLogging(programName);
+}
+
} // namespace network
} // namespace comm
int main(int argc, char **argv) {
- google::InitGoogleLogging(argv[0]);
+ comm::network::InitLogging(argv[0]);
if (comm::network::tools::isDevMode()) {
comm::network::config::ConfigManager::getInstance().load(
comm::network::DEV_CONFIG_FILE_PATH);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 1, 5:42 PM (21 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2605717
Default Alt Text
D4132.diff (906 B)
Attached To
Mode
D4132: [services] Tunnelbroker - Distinguish logging levels in dev-mode
Attached
Detach File
Event Timeline
Log In to Comment