Changeset 108:2a213cf87af8 in rrlib_logging


Ignore:
Timestamp:
11.09.2013 11:45:40 (7 years ago)
Author:
Tobias Föhst <foehst@…>
Branch:
default
Phase:
public
Message:

Fixed default configuration context

Location:
configuration
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • configuration/tConfiguration.cpp

    r107 r108  
    8484    prints_location(parent ? parent->prints_location : default_context.cPRINTS_LOCATION), 
    8585    max_message_level(parent ? parent->max_message_level : default_context.cMAX_LOG_LEVEL), 
    86     sinks(parent ? parent->sinks : std::vector<std::shared_ptr<sinks::tSink>>()), 
     86    sinks(parent ? parent->sinks : default_context.cSINKS), 
    8787    stream_buffer_ready(false) 
    8888{ 
  • configuration/tConfiguration.h

    r106 r108  
    7575#include "rrlib/logging/messages/tFanOutBuffer.h" 
    7676#include "rrlib/logging/sinks/tSink.h" 
     77#include "rrlib/logging/sinks/tStream.h" 
    7778 
    7879//---------------------------------------------------------------------- 
     
    110111  const bool cPRINTS_LOCATION; 
    111112  const tLogLevel cMAX_LOG_LEVEL; 
     113  const std::vector<std::shared_ptr<sinks::tSink>> cSINKS; 
    112114}; 
    113115#ifdef RRLIB_LOGGING_LESS_OUTPUT 
    114116static const tDefaultConfigurationContext cDEFAULT_CONTEXT 
    115117{ 
    116   false, false, false, false, tLogLevel::WARNING 
     118  false, false, false, false, tLogLevel::WARNING, { std::shared_ptr<sinks::tSink>(new sinks::tStream("stdout")) } 
    117119}; 
    118120#else 
    119121static const tDefaultConfigurationContext cDEFAULT_CONTEXT 
    120122{ 
    121   false, false, false, true, tLogLevel::DEBUG 
     123  false, false, false, true, tLogLevel::DEBUG, { std::shared_ptr<sinks::tSink>(new sinks::tStream("stdout")) } 
    122124}; 
    123125#endif 
Note: See TracChangeset for help on using the changeset viewer.