Changeset 100:f3c6135a0645 in rrlib_logging


Ignore:
Timestamp:
29.01.2013 11:36:59 (7 years ago)
Author:
Tobias Föhst <foehst@…>
Branch:
default
Phase:
public
Transplant:
af1d94cd0d2f3538635e81d77739ac59058a7b26
Message:

Making use of new safe enum interpretation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configuration.cpp

    r99 r100  
    6969// Const values 
    7070//---------------------------------------------------------------------- 
    71 const char * const xml_attribute_max_level_values[static_cast<size_t>(tLogLevel::DIMENSION)] = { "user", "error", "warning", "debug_warning", "debug", "debug_verbose_1", "debug_verbose_2", "debug_verbose_3" }; 
    72 const char * const xml_attribute_sink_values[eLOG_SINK_DIMENSION] = { "stdout", "stderr", "file", "combined_file" }; 
    7371 
    7472//---------------------------------------------------------------------- 
     
    241239  if (node.HasAttribute("max_level")) 
    242240  { 
    243     configuration.SetMaxMessageLevel(node.GetEnumAttribute<tLogLevel>("max_level", xml_attribute_max_level_values, xml_attribute_max_level_values + static_cast<size_t>(tLogLevel::DIMENSION))); 
     241    configuration.SetMaxMessageLevel(node.GetEnumAttribute<tLogLevel>("max_level")); 
    244242  } 
    245243 
     
    248246  { 
    249247    sinks_configured = true; 
    250     configuration.SetSinkMask(1 << node.GetEnumAttribute<tLogSink>("sink", xml_attribute_sink_values, xml_attribute_sink_values + eLOG_SINK_DIMENSION)); 
     248    configuration.SetSinkMask(1 << node.GetEnumAttribute<tLogSink>("sink")); 
    251249  } 
    252250 
     
    261259        return false; 
    262260      } 
    263       sink_mask |= 1 << it->GetEnumAttribute<tLogSink>("output", xml_attribute_sink_values, xml_attribute_sink_values + eLOG_SINK_DIMENSION); 
     261      sink_mask |= 1 << it->GetEnumAttribute<tLogSink>("output"); 
    264262    } 
    265263  } 
Note: See TracChangeset for help on using the changeset viewer.