Skip to content

Commit

Permalink
fixes for log parsing on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
iameli authored and Thulinma committed Dec 26, 2022
1 parent 5c511e0 commit 7f827ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ static const char *DBG_LVL_LIST[] ={"NONE", "FAIL", "ERROR", "WARN", "IN
#if DEBUG >= DLVL_DEVEL
#define DEBUG_MSG(lvl, msg, ...) \
if (Util::printDebugLevel >= lvl){\
fprintf(stderr, "%s|%s|%d|%s:%d|%s|" msg "\n", getprogname(), DBG_LVL_LIST[lvl], getpid(), __FILE__, \
fprintf(stderr, "%s|%s|%d|%s:%d|%s|" msg "\n", DBG_LVL_LIST[lvl], getprogname(), getpid(), __FILE__, \
__LINE__, Util::streamName, ##__VA_ARGS__); \
}
#else
Expand Down
5 changes: 3 additions & 2 deletions src/controller/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ int main_loop(int argc, char **argv){
// reload config from config file
Controller::Storage = JSON::fromFile(Controller::conf.getString("configFile"));

// start push checking thread
tthread::thread pushThread(Controller::pushCheckLoop, 0);

{// spawn thread that reads stderr of process
std::string logPipe = Util::getTmpFolder() + "MstLog";
if (mkfifo(logPipe.c_str(), S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH) != 0){
Expand Down Expand Up @@ -569,8 +572,6 @@ int main_loop(int argc, char **argv){
tthread::thread UDPAPIThread(Controller::handleUDPAPI, 0);
// start monitoring thread /*LTS*/
tthread::thread uplinkThread(Controller::uplinkConnection, 0); /*LTS*/
// start push checking thread
tthread::thread pushThread(Controller::pushCheckLoop, 0);
#ifdef UPDATER
// start updater thread
tthread::thread updaterThread(Controller::updateThread, 0);
Expand Down

0 comments on commit 7f827ca

Please sign in to comment.