OSVR / OSVR-Core

The core libraries, applications, and plugins of the OSVR software platform.
Apache License 2.0
329 stars 124 forks source link

Added osvr_server command-line options #529

Closed godbyk closed 7 years ago

godbyk commented 7 years ago

This PR adds command-line options to the server for adjusting the log verbosity and also allows the server to run without specifying a configuration file (in which case it will assume an empty configuration { }).

$ ./osvr_server --help
Command Line Options:
  --help                display this help message
  -v [ --verbose ]      enable verbose logging
  -d [ --debug ]        enable debug logging

Verbose logging sets the log level to debug and debug logging sets the log level to trace.

This subsumes PR #293 by @Outurnate.

godbyk commented 7 years ago

If no configuration file is specified, we default to using osvr::server::getDefaultConfigFilename(). If that fails (e.g., that file doesn't exist), then we'll use an empty { } configuration.