logsui/inc/logslogger.h
changeset 20 6a40edd41841
parent 16 c5af8598d22c
equal deleted inserted replaced
19:e4c884866116 20:6a40edd41841
    39 #define LOGS_QDEBUG_EVENT( ev )
    39 #define LOGS_QDEBUG_EVENT( ev )
    40 #define LOGS_QDEBUG_EVENT_ARR( arr )
    40 #define LOGS_QDEBUG_EVENT_ARR( arr )
    41 
    41 
    42 #else // debug build; logs
    42 #else // debug build; logs
    43 
    43 
    44 
       
    45 const char logsDebugPrefix[]    = "Debug: ";
    44 const char logsDebugPrefix[]    = "Debug: ";
    46 const char logsWarningPrefix[]  = "Warning: ";
    45 const char logsWarningPrefix[]  = "Warning: ";
    47 const char logsCriticalPrefix[] = "Critical: ";
    46 const char logsCriticalPrefix[] = "Critical: ";
    48 const char logsFatalPrefix[]    = "Fatal: ";
    47 const char logsFatalPrefix[]    = "Fatal: ";
    49 
    48 
    54 #include <stdio.h>
    53 #include <stdio.h>
    55 #include <stdlib.h>
    54 #include <stdlib.h>
    56 
    55 
    57 const char logsLogFile[] = "C:/logs/logsapp/logsappdebug.txt";// Logs application log filename.
    56 const char logsLogFile[] = "C:/logs/logsapp/logsappdebug.txt";// Logs application log filename.
    58 
    57 
       
    58 
       
    59 #define LOGS_DEBUG_ENABLED
    59 
    60 
    60 #define LOGS_QDEBUG( a )\
    61 #define LOGS_QDEBUG( a )\
    61     qDebug() << a;
    62     qDebug() << a;
    62 
    63 
    63 #define LOGS_QDEBUG_2( a, b)\
    64 #define LOGS_QDEBUG_2( a, b)\
   103 #else
   104 #else
   104 #define LOGS_QDEBUG_EVENT( ev )
   105 #define LOGS_QDEBUG_EVENT( ev )
   105 #define LOGS_QDEBUG_EVENT_ARR( arr )
   106 #define LOGS_QDEBUG_EVENT_ARR( arr )
   106 #endif
   107 #endif
   107 
   108 
   108 // File logging can be disabled by commenting definition below. 
       
   109 #define LOGS_FILE_LOGGING_ENABLED
       
   110 
       
   111 #if ( defined __WINSCW__ ) || ( defined __WINS__ )
       
   112 // No sense to have file logging enabled in wins
       
   113 #undef LOGS_FILE_LOGGING_ENABLED
       
   114 #endif
       
   115 
       
   116 #ifdef LOGS_FILE_LOGGING_ENABLED
       
   117 const bool logsFileLoggingEnabled = ETrue;
       
   118 #else
       
   119 const bool logsFileLoggingEnabled = EFalse;
       
   120 #endif
       
   121 
       
   122 
   109 
   123 #endif
   110 #endif
   124 
   111 
   125 #endif // LOGSLOGGER_H
   112 #endif // LOGSLOGGER_H
   126 
   113