Page MenuHomePhabricator

D4132.diff
No OneTemporary

D4132.diff

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

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)

Event Timeline