Skip to content

Commit

Permalink
-G option for logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jasper committed Oct 25, 2024
1 parent 5d09c1d commit 1553b98
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Application/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,6 @@ int main(int argc, char* argv[]) {
Logger::getInstance();
Logger::getInstance().setLogToConsole(true);

Info() << "Application started.";

try {
#ifdef _WIN32
if (!SetConsoleCtrlHandler(consoleHandler, TRUE))
Expand All @@ -275,7 +273,6 @@ int main(int argc, char* argv[]) {
signal(SIGPIPE, consoleHandler);
#endif

printVersion();
_receivers.back()->refreshDevices();

const std::string MSG_NO_PARAMETER = "does not allow additional parameter.";
Expand All @@ -296,6 +293,10 @@ int main(int argc, char* argv[]) {
std::string arg3 = count >= 3 ? std::string(argv[ptr + 3]) : "";

switch (param[1]) {
case 'G':
Assert(count == 1, param, MSG_NO_PARAMETER);
Logger::getInstance().setLogToFile(true, arg1);
break;
case 's':
Assert(count == 1, param, "does require one parameter [sample rate].");
receiver.setSampleRate(Util::Parse::Integer(arg1, 12500, 12288000));
Expand Down Expand Up @@ -646,6 +647,8 @@ int main(int argc, char* argv[]) {
ptr += count + 1;
}

printVersion();

// -------------
// Read config file

Expand Down

0 comments on commit 1553b98

Please sign in to comment.