Ignore:
Timestamp:
16/12/2006 20:27:44 (5 years ago)
Author:
chris
Message:

Change all logging to use the logging framework, as an example. (refs #3)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/chris/merge/bin/bbackupd/bbackupd.cpp

    r1027 r1226  
    1313#include "BoxPortsAndFiles.h" 
    1414#include "BackupStoreException.h" 
     15#include "Logging.h" 
    1516 
    1617#include "MemLeakFindOn.h" 
     
    2728        MAINHELPER_START 
    2829 
     30        Logging::SetProgramName("Box Backup (bbackupd)"); 
     31        Logging::ToConsole(true); 
     32        Logging::FilterSyslog (Log::EVERYTHING); 
     33 
     34        #ifdef NDEBUG 
     35                Logging::FilterConsole(Log::INFO); 
     36        #else 
     37                Logging::FilterConsole(Log::EVERYTHING); 
     38        #endif 
     39         
    2940#ifdef WIN32 
    30  
    31         ::openlog("Box Backup (bbackupd)", LOG_PID, LOG_LOCAL6); 
    3241 
    3342        if(argc == 2 && 
     
    5766        { 
    5867                runAsWin32Service = true; 
     68                Logging::ToSyslog(true); 
    5969        } 
    6070 
     
    6777        if (runAsWin32Service) 
    6878        { 
    69                 syslog(LOG_INFO, "Box Backup service starting"); 
     79                BOX_INFO("Box Backup service starting"); 
    7080 
    7181                char* config = NULL; 
     
    8292                } 
    8393 
    84                 syslog(LOG_INFO, "Box Backup service shut down"); 
     94                BOX_INFO("Box Backup service shut down"); 
    8595        } 
    8696        else 
Note: See TracChangeset for help on using the changeset viewer.