Fix #238
This commit is contained in:
parent
2a5dd5f738
commit
78a39a6578
|
@ -53,19 +53,18 @@ version(OSX) version = useXDG;
|
||||||
|
|
||||||
int main(string[] args)
|
int main(string[] args)
|
||||||
{
|
{
|
||||||
info("Starting up...");
|
|
||||||
StopWatch sw = StopWatch(AutoStart.yes);
|
|
||||||
|
|
||||||
ushort port = 9166;
|
ushort port = 9166;
|
||||||
bool help;
|
bool help;
|
||||||
bool printVersion;
|
bool printVersion;
|
||||||
bool ignoreConfig;
|
bool ignoreConfig;
|
||||||
string[] importPaths;
|
string[] importPaths;
|
||||||
|
LogLevel level = globalLogLevel;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
getopt(args, "port|p", &port, "I", &importPaths, "help|h", &help,
|
getopt(args, "port|p", &port, "I", &importPaths, "help|h", &help,
|
||||||
"version", &printVersion, "ignoreConfig", &ignoreConfig);
|
"version", &printVersion, "ignoreConfig", &ignoreConfig,
|
||||||
|
"logLevel", &level);
|
||||||
}
|
}
|
||||||
catch (ConvException e)
|
catch (ConvException e)
|
||||||
{
|
{
|
||||||
|
@ -74,6 +73,11 @@ int main(string[] args)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
globalLogLevel = level;
|
||||||
|
|
||||||
|
info("Starting up...");
|
||||||
|
StopWatch sw = StopWatch(AutoStart.yes);
|
||||||
|
|
||||||
if (printVersion)
|
if (printVersion)
|
||||||
{
|
{
|
||||||
version (Windows)
|
version (Windows)
|
||||||
|
@ -334,5 +338,9 @@ options:
|
||||||
Prints the version number and then exits.
|
Prints the version number and then exits.
|
||||||
|
|
||||||
--port PORTNUMBER | -pPORTNUMBER
|
--port PORTNUMBER | -pPORTNUMBER
|
||||||
Listens on PORTNUMBER instead of the default port 9166.`, programName);
|
Listens on PORTNUMBER instead of the default port 9166.
|
||||||
|
|
||||||
|
--logLevel LEVEL
|
||||||
|
The logging level. Valid values are 'all', 'trace', 'info', 'warning',
|
||||||
|
'error', 'critical', 'fatal', and 'off'`, programName);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue