summaryrefslogtreecommitdiff
path: root/lib/server
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2008-10-03 22:46:16 +0000
committerChris Wilson <chris+github@qwirx.com>2008-10-03 22:46:16 +0000
commit41ae62b3fb1d1bfdfe805b4102b284bfde0ecbf0 (patch)
treed15511d1b416ef04d20b5cabd4cc77b0533ebe2a /lib/server
parentadb9a4fdd2bb5060bc33f2057f9b4649457e5b0a (diff)
Remove -K option which now does nothing on Windows.
Add -Q option which disables all logging instead.
Diffstat (limited to 'lib/server')
-rw-r--r--lib/server/Daemon.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/server/Daemon.cpp b/lib/server/Daemon.cpp
index 2d319f38..4d7cbb34 100644
--- a/lib/server/Daemon.cpp
+++ b/lib/server/Daemon.cpp
@@ -95,9 +95,9 @@ std::string Daemon::GetOptionString()
{
return "c:"
#ifndef WIN32
- "DF"
+ "DFK"
#endif
- "hkKPqt:TUvVW:";
+ "hkPqQt:TUvVW:";
}
void Daemon::Usage()
@@ -116,13 +116,14 @@ void Daemon::Usage()
" -F Do not fork into background, but fork to serve multiple clients\n"
#endif
" -k Keep console open after fork, keep writing log messages to it\n"
- " -K Stop writing log messages to console while daemon is running\n"
#ifndef WIN32
+ " -K Stop writing log messages to console while daemon is running\n"
" -P Show process ID (PID) in console output\n"
#endif
" -q Run more quietly, reduce verbosity level by one, can repeat\n"
+ " -Q Run at minimum verbosity, log nothing\n"
" -v Run more verbosely, increase verbosity level by one, can repeat\n"
- " -V Run at maximum verbosity\n"
+ " -V Run at maximum verbosity, log everything\n"
" -W <level> Set verbosity to error/warning/notice/info/trace/everything\n"
" -t <tag> Tag console output with specified marker\n"
" -T Timestamp console output\n"
@@ -203,6 +204,13 @@ int Daemon::ProcessOption(signed int option)
}
break;
+ case 'Q':
+ {
+ mLogLevel = Log::NOTHING;
+ }
+ break;
+
+
case 'v':
{
if(mLogLevel == Log::EVERYTHING)
@@ -621,7 +629,7 @@ int Daemon::Main(const std::string &rConfigFileName)
TRACE_TO_STDOUT(false);
#endif // ! WIN32
Logging::ToConsole(false);
- }
+ }
// Log the start message
BOX_NOTICE("Starting daemon, version: " << BOX_VERSION);