Changeset 119:570abf734401 in rrlib_logging


Ignore:
Timestamp:
15.04.2014 17:08:08 (6 years ago)
Author:
Tobias Föhst <foehst@…>
Branch:
default
Phase:
public
Message:

Changed singleton lifetimes to support log messages in destructors of objects that were created earlier than the log domain registry

Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • configuration/tDomainRegistry.h

    r110 r119  
    5353//#include <string> 
    5454#include <vector> 
     55#include <iostream> 
    5556 
    5657#include "rrlib/design_patterns/singleton.h" 
     
    6364// Internal includes with "" 
    6465//---------------------------------------------------------------------- 
     66#include "rrlib/logging/configuration/DomainRegistryLifetime.h" 
    6567#include "rrlib/logging/configuration/tConfiguration.h" 
    6668 
     
    8183//---------------------------------------------------------------------- 
    8284class tDomainRegistryImplementation; 
    83 typedef design_patterns::tSingletonHolder<tDomainRegistryImplementation, design_patterns::singleton::Longevity> tDomainRegistry; 
     85typedef design_patterns::tSingletonHolder<tDomainRegistryImplementation, DomainRegistryLifetime> tDomainRegistry; 
    8486inline unsigned int GetLongevity(tDomainRegistryImplementation *) 
    8587{ 
  • make.xml

    r109 r119  
    55  <rrlib libs="rt"> 
    66    <sources> 
    7       configuration/*.cpp 
    8       messages/*.cpp 
     7      configuration/* 
     8      messages/* 
    99      sinks/tFile.cpp 
    1010      sinks/tStream.cpp 
  • messages/tStream.cpp

    r110 r119  
    6060// Forward declarations / typedefs / enums 
    6161//---------------------------------------------------------------------- 
    62 typedef design_patterns::tSingletonHolder<std::mutex> tStreamMutex; 
     62typedef design_patterns::tSingletonHolder<std::mutex, design_patterns::singleton::PhoenixSingleton> tStreamMutex; 
    6363 
    6464//---------------------------------------------------------------------- 
  • sinks/tSink.h

    r110 r119  
    7272//---------------------------------------------------------------------- 
    7373class tSink; 
    74 typedef design_patterns::tSingletonHolder<design_patterns::tFactory<tSink, std::string, std::function<tSink *(const xml::tNode &, const tConfiguration &)>>> tSinkFactory; 
     74typedef design_patterns::tSingletonHolder<design_patterns::tFactory<tSink, std::string, std::function<tSink *(const xml::tNode &, const tConfiguration &)>>, design_patterns::singleton::PhoenixSingleton> tSinkFactory; 
    7575 
    7676//---------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.