logging touchups in voxel-server

This commit is contained in:
Stephen Birarda 2013-09-30 13:36:36 -07:00
parent 32314ad540
commit 774eef1c12

View file

@ -15,6 +15,7 @@
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
#include <Logging.h>
#include <OctalCode.h> #include <OctalCode.h>
#include <NodeList.h> #include <NodeList.h>
#include <NodeTypes.h> #include <NodeTypes.h>
@ -167,6 +168,11 @@ void VoxelServer::parsePayload() {
//int main(int argc, const char * argv[]) { //int main(int argc, const char * argv[]) {
void VoxelServer::run() { void VoxelServer::run() {
const char VOXEL_SERVER_LOGGING_TARGET_NAME[] = "voxel-server";
// change the logging target name while this is running
Logging::setTargetName(VOXEL_SERVER_LOGGING_TARGET_NAME);
// Now would be a good time to parse our arguments, if we got them as assignment // Now would be a good time to parse our arguments, if we got them as assignment
if (getNumPayloadBytes() > 0) { if (getNumPayloadBytes() > 0) {
@ -175,7 +181,7 @@ void VoxelServer::run() {
pthread_mutex_init(&_treeLock, NULL); pthread_mutex_init(&_treeLock, NULL);
qInstallMessageHandler(sharedMessageHandler); qInstallMessageHandler(Logging::verboseMessageHandler);
const char* JURISDICTION_FILE = "--jurisdictionFile"; const char* JURISDICTION_FILE = "--jurisdictionFile";
const char* jurisdictionFile = getCmdOption(_argc, _argv, JURISDICTION_FILE); const char* jurisdictionFile = getCmdOption(_argc, _argv, JURISDICTION_FILE);