mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-23 14:06:14 +02:00
add hidden debug log option
This commit is contained in:
parent
74de3f49ec
commit
72cb5a0e7e
2 changed files with 6 additions and 2 deletions
|
@ -81,6 +81,7 @@ int main (int argc, char **argv)
|
|||
int processPriority(-3);
|
||||
|
||||
Switch helpSwitch("", "help", "produce help message");
|
||||
Switch debugSwitch("", "debug", "enable debug logging");
|
||||
Switch versionSwitch("v", "version", "show version number");
|
||||
Switch listSwitch("l", "list", "list pcm devices");
|
||||
Value<string> hostValue("h", "host", "server hostname or ip address", "", &host);
|
||||
|
@ -94,6 +95,7 @@ int main (int argc, char **argv)
|
|||
|
||||
OptionParser op("Allowed options");
|
||||
op.add(helpSwitch)
|
||||
.add(debugSwitch, hidden)
|
||||
.add(versionSwitch)
|
||||
.add(hostValue)
|
||||
.add(portValue)
|
||||
|
@ -155,7 +157,7 @@ int main (int argc, char **argv)
|
|||
|
||||
Log::init(
|
||||
{
|
||||
make_shared<LogSinkCout>(LogPriority::info, LogSink::Type::all), //, "%Y-%m-%d %H-%M-%S [#prio]"),
|
||||
make_shared<LogSinkCout>(debugSwitch.isSet()?(LogPriority::debug):(LogPriority::info), LogSink::Type::all, debugSwitch.isSet()?"%Y-%m-%d %H-%M-%S.#ms [#prio] (#tag)":"%Y-%m-%d %H-%M-%S [#prio]"),
|
||||
make_shared<LogSinkNative>("snapclient", LogPriority::debug, LogSink::Type::special)
|
||||
}
|
||||
);
|
||||
|
|
|
@ -60,6 +60,7 @@ int main(int argc, char* argv[])
|
|||
int processPriority(0);
|
||||
|
||||
Switch helpSwitch("h", "help", "Produce help message");
|
||||
Switch debugSwitch("", "debug", "enable debug logging");
|
||||
Switch versionSwitch("v", "version", "Show version number");
|
||||
Value<size_t> portValue("p", "port", "Server port", settings.port, &settings.port);
|
||||
Value<size_t> controlPortValue("", "controlPort", "Remote control port", settings.controlPort, &settings.controlPort);
|
||||
|
@ -76,6 +77,7 @@ int main(int argc, char* argv[])
|
|||
|
||||
OptionParser op("Allowed options");
|
||||
op.add(helpSwitch)
|
||||
.add(debugSwitch, hidden)
|
||||
.add(versionSwitch)
|
||||
.add(portValue)
|
||||
.add(controlPortValue)
|
||||
|
@ -143,7 +145,7 @@ int main(int argc, char* argv[])
|
|||
|
||||
Log::init(
|
||||
{
|
||||
make_shared<LogSinkCout>(LogPriority::info, LogSink::Type::all), //, "%Y-%m-%d %H-%M-%S [#prio]"),
|
||||
make_shared<LogSinkCout>(debugSwitch.isSet()?(LogPriority::debug):(LogPriority::info), LogSink::Type::all, debugSwitch.isSet()?"%Y-%m-%d %H-%M-%S.#ms [#prio] (#tag)":"%Y-%m-%d %H-%M-%S [#prio]"),
|
||||
make_shared<LogSinkNative>("snapserver", LogPriority::debug, LogSink::Type::special)
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue