Skip to content

Commit

Permalink
Use warn log level only for warnings, otherwise use notice or info
Browse files Browse the repository at this point in the history
  • Loading branch information
neilcook committed May 23, 2018
1 parent 1b83c4f commit e59905f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions common/perf-stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void statsReportingThread()
for (auto i=lookupPerfStat.begin(); i!=lookupPerfStat.end(); ++i) {
ss << i->second << "=" << getStat(i->first) << " ";
}
warnlog("%s", ss.str());
noticelog("%s", ss.str());

if (command_stats.size() != 0) {
ss.str(std::string());
Expand All @@ -162,7 +162,7 @@ void statsReportingThread()
for (const auto& i : command_stats) {
ss << i << "=" << getCommandStat(i) << " ";
}
warnlog("%s", ss.str());
noticelog("%s", ss.str());
}

if (custom_stats.size() != 0) {
Expand All @@ -172,14 +172,14 @@ void statsReportingThread()
for (const auto& i : custom_stats) {
ss << i << "=" << getCustomStat(i) << " ";
}
warnlog("%s", ss.str());
noticelog("%s", ss.str());
}
}
}

void startStatsThread()
{
warnlog("Starting stats reporting thread");
infolog("Starting stats reporting thread");
initPerfStats();
thread t(statsReportingThread);
t.detach();
Expand Down
4 changes: 2 additions & 2 deletions common/wforce-webserver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ void WforceWebserver::connectionStatsThread(WforceWebserver* wws)
for (;;) {
sleep(interval);

warnlog("Number of active connections: %d, Max active connections: %d", wws->getNumConns(), wws->d_max_conns);
noticelog("Number of active connections: %d, Max active connections: %d", wws->getNumConns(), wws->d_max_conns);
}
}

Expand Down Expand Up @@ -405,7 +405,7 @@ void WforceWebserver::pollThread(WforceWebserver* wws)

void WforceWebserver::start(int sock, const ComboAddress& local, const std::string& password, WforceWebserver* wws)
{
warnlog("WforceWebserver launched on %s", local.toStringWithPort());
noticelog("WforceWebserver launched on %s", local.toStringWithPort());
auto localACL=wws->d_ACL.getLocal();

// spin up a thread to do the polling on the connections accepted by this thread
Expand Down
2 changes: 1 addition & 1 deletion trackalert/trackalert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ try
{
ComboAddress client;
int sock;
warnlog("Accepting control connections on %s", local.toStringWithPort());
noticelog("Accepting control connections on %s", local.toStringWithPort());
while((sock=SAccept(fd, client)) >= 0) {
infolog("Got control connection from %s", client.toStringWithPort());
thread t(controlClientThread, sock, client);
Expand Down
2 changes: 1 addition & 1 deletion wforce/blacklist.cc
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ bool BlackListDB::loadPersistEntries()
throw WforceException(myerr);
}
if (retval == true)
warnlog("Loaded %d blacklist entries from persistent redis DB", num_entries);
noticelog("Loaded %d blacklist entries from persistent redis DB", num_entries);
}
return retval;
}
Expand Down
6 changes: 3 additions & 3 deletions wforce/wforce.cc
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ try
{
ComboAddress client;
int sock;
warnlog("Accepting control connections on %s", local.toStringWithPort());
noticelog("Accepting control connections on %s", local.toStringWithPort());
while((sock=SAccept(fd, client)) >= 0) {
infolog("Got control connection from %s", client.toStringWithPort());
thread t(controlClientThread, sock, client);
Expand Down Expand Up @@ -832,7 +832,7 @@ void receiveReplicationOperationsTCP(ComboAddress local)
sock.setReuseAddr();
sock.bind(local);
sock.listen(1024);
warnlog("Launched TCP sibling replication listener on %s", local.toStringWithPort());
noticelog("Launched TCP sibling replication listener on %s", local.toStringWithPort());

for (;;) {
// we wait for activity
Expand Down Expand Up @@ -865,7 +865,7 @@ void receiveReplicationOperations(ComboAddress local)
s->checkIgnoreSelf(local);
}

warnlog("Launched UDP sibling replication listener on %s", local.toStringWithPort());
noticelog("Launched UDP sibling replication listener on %s", local.toStringWithPort());
for(;;) {
shared_ptr<Sibling> recv_sibling = nullptr;
len=recvfrom(sock.getHandle(), buf, sizeof(buf), 0, (struct sockaddr*)&remote, &remlen);
Expand Down

0 comments on commit e59905f

Please sign in to comment.