diff options
author | Stijn Buys <ingar@osirion.org> | 2012-11-18 21:54:47 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2012-11-18 21:54:47 +0000 |
commit | 5d959c5ba476eb0b103fe5953cca69939a6d836a (patch) | |
tree | 81015c1b3b62c0de1dcdeb9c2eda2ac67b7a74ea /src/dedicated/dedicated.cc | |
parent | 0b54403c6ac20f2cdd1454e90e9006379f374ec0 (diff) |
Log dedicated server console messages to server.log,
print version number and command line to console on startup.
Diffstat (limited to 'src/dedicated/dedicated.cc')
-rw-r--r-- | src/dedicated/dedicated.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/dedicated/dedicated.cc b/src/dedicated/dedicated.cc index 63a1f43..adaba15 100644 --- a/src/dedicated/dedicated.cc +++ b/src/dedicated/dedicated.cc @@ -18,11 +18,12 @@ namespace dedicated void run(int count, char **arguments) { - std::cout << core::name() << " " << core::version() << std::endl; - - for (int i = 0; i < count; i++) - std::cout << arguments[i] << " "; - std::cout << std::endl; + + con_print << " command line "; + for (int i = 0; i < count; i++) { + con_print << arguments[i] << " "; + } + con_print << std::endl; Dedicated app; app.init(count, arguments); @@ -41,6 +42,9 @@ void Dedicated::init(int count, char **arguments) core::Cvar::set("sv_dedicated", "1", core::Cvar::ReadOnly); core::Application::init(count, arguments); + + // start logging + console()->open_log(); // the command line is in the buffer, execute it core::CommandBuffer::exec(); |