| The Gaudi Framework v28r2-patches (bc4ad17a)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
IssueLogger Class Reference

`#include <src/IssueLogger.h>`

Inheritance diagram for IssueLogger:
[legend]
Collaboration diagram for IssueLogger:
[legend]

## Classes
class | logger_t

## Public Member Functions
| IssueLogger (const std::string &name, ISvcLocator *svc)
| ~IssueLogger () override=default
StatusCode | initialize () override
StatusCode | reinitialize () override
StatusCode | finalize () override
void | report (IssueSeverity::Level level, const std::string &msg, const std::string &origin) override
void | report (const IssueSeverity &err) override
Public Member Functions inherited from extends< Service, IIssueLogger >
void * | i_cast (const InterfaceID &tid) const override
| Implementation of IInterface::i_cast. More...
StatusCode | queryInterface (const InterfaceID &ti, void **pp) override
| Implementation of IInterface::queryInterface. More...
std::vector< std::string > | getInterfaceNames () const override
| Implementation of IInterface::getInterfaceNames. More...
| ~extends () override=default
| Virtual destructor. More...
Public Member Functions inherited from Service
const std::string & | name () const override
| Retrieve name of the service. More...
StatusCode | configure () override
StatusCode | initialize () override
StatusCode | start () override
StatusCode | stop () override
StatusCode | finalize () override
StatusCode | terminate () override
Gaudi::StateMachine::State | FSMState () const override
Gaudi::StateMachine::State | targetFSMState () const override
StatusCode | reinitialize () override
StatusCode | restart () override
StatusCode | sysInitialize () override
| Initialize Service. More...
StatusCode | sysStart () override
| Initialize Service. More...
StatusCode | sysStop () override
| Initialize Service. More...
StatusCode | sysFinalize () override
| Finalize Service. More...
StatusCode | sysReinitialize () override
| Re-initialize the Service. More...
StatusCode | sysRestart () override
| Re-initialize the Service. More...
| Service (std::string name, ISvcLocator *svcloc)
| Standard Constructor. More...
SmartIF< ISvcLocator > & | serviceLocator () const override
| Retrieve pointer to service locator. More...
StatusCode | setProperties ()
| Method for setting declared properties to the values specified for the job. More...
template<class T >
StatusCode | service (const std::string &name, const T *&psvc, bool createIf=true) const
| Access a service by name, creating it if it doesn't already exist. More...
template<class T >
StatusCode | service (const std::string &name, T *&psvc, bool createIf=true) const
template<typename IFace = IService>
SmartIF< IFace > | service (const std::string &name, bool createIf=true) const
template<class T >
StatusCode | service (const std::string &svcType, const std::string &svcName, T *&psvc) const
| Access a service by name and type, creating it if it doesn't already exist. More...
template<class T >
StatusCode | declarePrivateTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
| Declare used Private tool. More...
template<class T >
StatusCode | declarePublicTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
| Declare used Public tool. More...
SmartIF< IAuditorSvc > & | auditorSvc () const
| The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
| PropertyHolder ()=default
| ~PropertyHolder () override=default
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Details::PropertyBase &prop)
| Declare a property. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, TYPE &value, const std::string &doc="none")
| Helper to wrap a regular data member and use it as a regular property. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, TYPE &value, const std::string &doc="none") const
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
| Declare a PropertyBase instance setting name and documentation. More...
Gaudi::Details::PropertyBase * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
| Declare a remote property. More...
StatusCode | setProperty (const Gaudi::Details::PropertyBase &p) override
| set the property form another property More...
StatusCode | setProperty (const std::string &s) override
| set the property from the formatted string More...
StatusCode | setProperty (const std::string &n, const std::string &v) override
| set the property from name and the value More...
StatusCode | setProperty (const std::string &name, const TYPE &value)
| set the property form the value More...
StatusCode | getProperty (Gaudi::Details::PropertyBase *p) const override
| get the property More...
const Gaudi::Details::PropertyBase & | getProperty (const std::string &name) const override
| get the property by name More...
StatusCode | getProperty (const std::string &n, std::string &v) const override
| convert the property to the string More...
const std::vector< Gaudi::Details::PropertyBase * > & | getProperties () const override
| get all properties More...
bool | hasProperty (const std::string &name) const override
| Return true if we have a property with the given name. More...
| PropertyHolder (const PropertyHolder &)=delete
PropertyHolder & | operator= (const PropertyHolder &)=delete
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, GaudiHandleBase &ref, const std::string &doc="none")
| Specializations for various GaudiHandles. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, GaudiHandleArrayBase &ref, const std::string &doc="none")
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, DataObjectHandleBase &ref, const std::string &doc="none")
Public Member Functions inherited from CommonMessagingBase
virtual | ~CommonMessagingBase ()=default
| Virtual destructor. More...
SmartIF< IMessageSvc > & | msgSvc () const
| The standard message service. More...
MsgStream & | msgStream () const
| Return an uninitialized MsgStream. More...
MsgStream & | msgStream (const MSG::Level level) const
| Predefined configurable message stream for the efficient printouts. More...
MsgStream & | always () const
| shortcut for the method msgStream(MSG::ALWAYS) More...
MsgStream & | fatal () const
| shortcut for the method msgStream(MSG::FATAL) More...
MsgStream & | err () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | error () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | warning () const
| shortcut for the method msgStream(MSG::WARNING) More...
MsgStream & | info () const
| shortcut for the method msgStream(MSG::INFO) More...
MsgStream & | debug () const
| shortcut for the method msgStream(MSG::DEBUG) More...
MsgStream & | verbose () const
| shortcut for the method msgStream(MSG::VERBOSE) More...
MsgStream & | msg () const
| shortcut for the method msgStream(MSG::INFO) More...
MSG::Level | msgLevel () const
| get the output level from the embedded MsgStream More...
MSG::Level | outputLevel () const __attribute__((deprecated))
| Backward compatibility function for getting the output level. More...
bool | msgLevel (MSG::Level lvl) const
| get the output level from the embedded MsgStream More...
Public Member Functions inherited from extend_interfaces< Interfaces... >
| ~extend_interfaces () override=default
| Virtual destructor. More...

## Private Member Functions
StatusCode | connect (const std::string &)
void | setupDefaultLogger ()
void | setupLevels (Gaudi::Details::PropertyBase &prop)
void | setupStreams (Gaudi::Details::PropertyBase &prop)

## Private Attributes
Gaudi::Property< std::vector< std::string > > | m_outputfile {this, "Output"}
Gaudi::Property< std::string > | m_reportLevelS {this, "ReportLevel", "WARNING"}
Gaudi::Property< std::string > | m_traceLevelS {this, "TracebackLevel", "ERROR"}
Gaudi::Property< bool > | m_showTime {this, "ShowTime", false}
IssueSeverity::Level | m_reportLevel
IssueSeverity::Level | m_traceLevel
std::array< logger_t, IssueSeverity::NUM_LEVELS > | m_log

## Additional Inherited Members
Public Types inherited from extends< Service, IIssueLogger >
using | base_class = extends
| Typedef to this class. More...
using | extend_interfaces_base = extend_interfaces< Interfaces... >
| Typedef to the base of this class. More...
Public Types inherited from Service
typedef Gaudi::PluginService::Factory< IService *, const std::string &, ISvcLocator * > | Factory
Public Types inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
using | PropertyHolderImpl = PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
| Typedef used to refer to this class from derived classes, as in. More...
Public Types inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
using | base_class = CommonMessaging
Public Types inherited from extend_interfaces< Interfaces... >
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
| take union of the ext_iids of all Interfaces... More...
Protected Member Functions inherited from Service
| ~Service () override
| Standard Destructor. More...
int | outputLevel () const
| get the `Service's` output level More...
Protected Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
Gaudi::Details::PropertyBase * | property (const std::string &name) const
Protected Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
void | updateMsgStreamOutputLevel (int level)
| Update the output level of the cached MsgStream. More...
Protected Attributes inherited from Service
Gaudi::StateMachine::State | m_state = Gaudi::StateMachine::OFFLINE
| Service state. More...
Gaudi::StateMachine::State | m_targetState = Gaudi::StateMachine::OFFLINE
| Service state. More...
Gaudi::Property< int > | m_outputLevel {this, "OutputLevel", MSG::NIL, "output level"}
Gaudi::Property< bool > | m_auditInit {this, "AuditServices", false, "[[deprecated]] unused"}
Gaudi::Property< bool > | m_auditorInitialize {this, "AuditInitialize", false, "trigger auditor on initialize()"}
Gaudi::Property< bool > | m_auditorStart {this, "AuditStart", false, "trigger auditor on start()"}
Gaudi::Property< bool > | m_auditorStop {this, "AuditStop", false, "trigger auditor on stop()"}
Gaudi::Property< bool > | m_auditorFinalize {this, "AuditFinalize", false, "trigger auditor on finalize()"}
Gaudi::Property< bool > | m_auditorReinitialize {this, "AuditReinitialize", false, "trigger auditor on reinitialize()"}
Gaudi::Property< bool > | m_auditorRestart {this, "AuditRestart", false, "trigger auditor on restart()"}
SmartIF< IAuditorSvc > | m_pAuditorSvc
| Auditor Service. More...

## Detailed Description

Definition at line 13 of file IssueLogger.h.

## Constructor & Destructor Documentation

IssueLogger::IssueLogger | ( | const std::string & | name,
|  | ISvcLocator * | svc
| ) |  |

Definition at line 54 of file IssueLogger.cpp.

54 : base_class( name, svc )
55 {
56
57 m_reportLevelS.declareUpdateHandler( &IssueLogger::setupLevels, this );
58 m_traceLevelS.declareUpdateHandler( &IssueLogger::setupLevels, this );
59 m_outputfile.declareUpdateHandler( &IssueLogger::setupStreams, this );
60
61 m_reportLevel = IssueSeverity::WARNING;
62 m_traceLevel = IssueSeverity::ERROR;
63 }
IssueLogger::setupStreams
void setupStreams(Gaudi::Details::PropertyBase &prop)
Definition: IssueLogger.cpp:199
IssueLogger::setupLevels
void setupLevels(Gaudi::Details::PropertyBase &prop)
Definition: IssueLogger.cpp:167
IssueSeverity::ERROR
Definition: IssueSeverity.h:56
extends< Service, IIssueLogger >::base_class
extends base_class
Typedef to this class.
Definition: extends.h:14
IssueLogger::m_reportLevel
IssueSeverity::Level m_reportLevel
Definition: IssueLogger.h:32
IssueLogger::m_outputfile
Gaudi::Property< std::vector< std::string > > m_outputfile
Definition: IssueLogger.h:27
IssueLogger::m_traceLevelS
Gaudi::Property< std::string > m_traceLevelS
Definition: IssueLogger.h:29
IssueLogger::m_traceLevel
IssueSeverity::Level m_traceLevel
Definition: IssueLogger.h:32
IssueLogger::m_reportLevelS
Gaudi::Property< std::string > m_reportLevelS
Definition: IssueLogger.h:28
IssueSeverity::WARNING
Definition: IssueSeverity.h:54

IssueLogger::~IssueLogger | ( |  | ) |
| override default

## Member Function Documentation

StatusCode IssueLogger::connect | ( | const std::string & | ident | ) |
| private

Definition at line 98 of file IssueLogger.cpp.

99 {
100
101 auto loc = ident.find( " " );
102 using Parser = Gaudi::Utils::AttribStringParser;
103 // note: if loc == string::npos then loc + 1 == 0
104 for ( auto attrib : Parser( ident.substr( loc + 1 ) ) ) {
105 toupper( attrib.tag );
106 IssueSeverity::Level level;
107 if ( attrib.tag == "DEBUG" ) {
108 level = IssueSeverity::DEBUG;
109 } else if ( attrib.tag == "INFO" ) {
110 level = IssueSeverity::INFO;
111 } else if ( attrib.tag == "WARNING" ) {
112 level = IssueSeverity::WARNING;
113 } else if ( attrib.tag == "RECOVERABLE" ) {
114 level = IssueSeverity::RECOVERABLE;
115 } else if ( attrib.tag == "ERROR" ) {
116 level = IssueSeverity::ERROR;
117 } else if ( attrib.tag == "FATAL" ) {
118 level = IssueSeverity::FATAL;
119 } else {
120 error() << "Unknown output level \"" << attrib.tag << "\"" << endmsg;
121 continue;
122 }
123
124 if ( m_log[level] ) {
125 info() << "closing stream " << m_log[level].name() << endmsg;
126 m_log[level].reset();
127 }
128
129 if ( attrib.value == "MsgSvc" ) {
130 m_log[level] = {new StreamLogger( msgSvc(), s_sevMsgMap.at( level ) ), &StreamLogger::WriteToMsgSvc};
131 } else if ( attrib.value == "STDERR" ) {
132 m_log[level] = {new StreamLogger( std::cerr ), &StreamLogger::WriteToStream};
133 } else if ( attrib.value == "STDOUT" ) {
134 m_log[level] = {new StreamLogger( std::cout ), &StreamLogger::WriteToStream};
135 } else { // A file
136 try {
137 m_log[level] = {new StreamLogger( attrib.value ), &StreamLogger::WriteToStream};
138 } catch ( std::exception& ) {
139 m_log[level].reset();
140 error() << "Unable to open file \"" << attrib.value << "\" for writing issues at level " << attrib.tag
141 << endmsg;
142 return StatusCode::FAILURE;
143 }
144 }
145 debug() << "Writing " << s_levelTrans.at( level ) << " issues to " << m_log[level].name() << endmsg;
146 }
147 return StatusCode::SUCCESS;
148 }
IssueSeverity::RECOVERABLE
Definition: IssueSeverity.h:55
StreamLogger
Definition: StreamLogger.h:11
Gaudi::Utils::AttribStringParser
Parse attribute strings allowing iteration over the various attributes.
Definition: AttribStringParser.h:30
StatusCode::SUCCESS
Definition: StatusCode.h:30
IssueSeverity::DEBUG
Definition: IssueSeverity.h:49
StatusCode::FAILURE
Definition: StatusCode.h:29
CommonMessagingBase::info
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:123
toupper
void toupper(std::string &s)
Definition: IssueLogger.cpp:50
IssueSeverity::ERROR
Definition: IssueSeverity.h:56
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:117
IssueSeverity::Level
Level
Definition: IssueSeverity.h:46
std::exception
STL class.
IssueSeverity::FATAL
Definition: IssueSeverity.h:57
std::string::find
T find(T...args)
IssueLogger::m_log
std::array< logger_t, IssueSeverity::NUM_LEVELS > m_log
Definition: IssueLogger.h:49
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:126
CommonMessagingBase::msgSvc
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Definition: CommonMessaging.h:70
std::string::substr
T substr(T...args)
gaudirun.level
level
Definition: gaudirun.py:261
StreamLogger::WriteToMsgSvc
void WriteToMsgSvc(const std::string &str)
Definition: StreamLogger.h:20
std::cerr
StreamLogger::WriteToStream
void WriteToStream(const std::string &str)
Definition: StreamLogger.h:19
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
IssueSeverity::INFO
Definition: IssueSeverity.h:53
IssueSeverity::WARNING
Definition: IssueSeverity.h:54

StatusCode IssueLogger::finalize | ( |  | ) |
| override

Definition at line 88 of file IssueLogger.cpp.

89 {
90
91 debug() << "IssueLogger::finalize" << endmsg;
92 std::for_each( std::begin( m_log ), std::end( m_log ), []( logger_t& i ) { i.reset(); } );
93 return Service::finalize();
94 }
Service::finalize
StatusCode finalize() override
Definition: Service.cpp:174
std::end
T end(T...args)
IssueLogger::m_log
std::array< logger_t, IssueSeverity::NUM_LEVELS > m_log
Definition: IssueLogger.h:49
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:126
std::begin
T begin(T...args)
std::for_each
T for_each(T...args)
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

StatusCode IssueLogger::initialize | ( |  | ) |
| override

Definition at line 67 of file IssueLogger.cpp.

68 {
69
70 StatusCode st = Service::initialize();
71 if ( st.isSuccess() ) {
72 setupDefaultLogger();
73 }
74 return st;
75 }
Service::initialize
StatusCode initialize() override
Definition: Service.cpp:64
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:74
IssueLogger::setupDefaultLogger
void setupDefaultLogger()
Definition: IssueLogger.cpp:217
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26

StatusCode IssueLogger::reinitialize | ( |  | ) |
| override

Definition at line 79 of file IssueLogger.cpp.

80 {
81
82 warning() << "reinitialize not implemented" << endmsg;
83 return StatusCode::SUCCESS;
84 }
StatusCode::SUCCESS
Definition: StatusCode.h:30
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:120
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

void IssueLogger::report | ( | IssueSeverity::Level | level,
|  | const std::string & | msg,
|  | const std::string & | origin
| ) |  |
| override

Definition at line 152 of file IssueLogger.cpp.

153 {
154 if ( lev < m_reportLevel ) return;
155 std::string msg = s_levelTrans.at( lev ) + " " + org + " \"" + str + "\"";
156 if ( m_showTime ) msg += " [" + Gaudi::Time::current().format( true, "%H:%M:%S %Y/%m/%d %Z" ) + "]";
157 if ( lev >= m_traceLevel ) msg += "\n" + getTraceBack();
158 m_log[lev]( msg );
159 }
CommonMessagingBase::msg
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:132
Gaudi::Time::current
static Time current(void)
Returns the current time.
Definition: Time.cpp:113
IssueLogger::m_reportLevel
IssueSeverity::Level m_reportLevel
Definition: IssueLogger.h:32
std::string
STL class.
std::string::at
T at(T...args)
IssueLogger::m_showTime
Gaudi::Property< bool > m_showTime
Definition: IssueLogger.h:30
IssueLogger::m_log
std::array< logger_t, IssueSeverity::NUM_LEVELS > m_log
Definition: IssueLogger.h:49
IssueLogger::m_traceLevel
IssueSeverity::Level m_traceLevel
Definition: IssueLogger.h:32
Gaudi::Time::format
std::string format(bool local, std::string spec="%c") const
Format the time using strftime.
Definition: Time.cpp:279

void IssueLogger::report | ( | const IssueSeverity & | err | ) |
| override

Definition at line 163 of file IssueLogger.cpp.

163 { report( err.getLevel(), err.getMsg(), err.getOrigin() ); }
IssueSeverity::getOrigin
std::string getOrigin() const
Definition: IssueSeverity.cpp:38
IssueSeverity::getLevel
IssueSeverity::Level getLevel() const
Definition: IssueSeverity.h:82
IssueSeverity::getMsg
std::string getMsg() const
Definition: IssueSeverity.h:83
IssueLogger::report
void report(IssueSeverity::Level level, const std::string &msg, const std::string &origin) override
Definition: IssueLogger.cpp:152

void IssueLogger::setupDefaultLogger | ( |  | ) |
| private

Definition at line 217 of file IssueLogger.cpp.

218 {
219 for ( int i = 1; i < IssueSeverity::NUM_LEVELS; ++i ) {
220 if ( !m_log[i] ) {
221 // default: dump to msgSvc
222 IssueSeverity::Level j = IssueSeverity::Level( i );
223 m_log[j] = {new StreamLogger( msgSvc(), s_sevMsgMap.at( j ) ), &StreamLogger::WriteToMsgSvc};
224 debug() << "Writing " << s_levelTrans.at( j ) << " issues to " << m_log[j].name() << endmsg;
225 }
226 }
227 }
StreamLogger
Definition: StreamLogger.h:11
IssueSeverity::Level
Level
Definition: IssueSeverity.h:46
IssueLogger::m_log
std::array< logger_t, IssueSeverity::NUM_LEVELS > m_log
Definition: IssueLogger.h:49
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:126
IssueSeverity::NUM_LEVELS
Definition: IssueSeverity.h:59
CommonMessagingBase::msgSvc
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Definition: CommonMessaging.h:70
StreamLogger::WriteToMsgSvc
void WriteToMsgSvc(const std::string &str)
Definition: StreamLogger.h:20
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

void IssueLogger::setupLevels | ( | Gaudi::Details::PropertyBase & | prop | ) |
| private

Definition at line 167 of file IssueLogger.cpp.

168 {
169
170 Gaudi::Property<std::string>* sap = dynamic_cast<Gaudi::Property<std::string>*>( &prop );
171 if ( !sap ) {
172 error() << "Could not convert " << prop.name() << "to a Gaudi::Property<std::string> (which it should be!)"
173 << endmsg;
174 return;
175 }
176
177 const std::string& val = sap->value();
178 auto set = [&]( IssueSeverity::Level& key, IssueSeverity::Level def ) {
179 if ( s_levelSTrans.find( val ) == s_levelSTrans.end() ) {
180 key = def;
181 error() << "Option " << prop.name() << ": unknown Issue Severity level \"" << val << "\". Setting it "
182 << s_levelTrans.at( def ) << endmsg;
183 } else {
184 key = s_levelSTrans.at( val );
185 }
186 };
187
188 if ( prop.name() == "ReportLevel" ) {
189 set( m_reportLevel, IssueSeverity::WARNING );
190 } else if ( prop.name() == "TracebackLevel" ) {
191 set( m_traceLevel, IssueSeverity::ERROR );
192 } else {
193 error() << "setting up unknown property \"" << prop.name() << "\"" << endmsg;
194 }
195 }
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:314
Gaudi::Details::PropertyBase::name
const std::string name() const
property name
Definition: Property.h:40
IssueSeverity::ERROR
Definition: IssueSeverity.h:56
IssueLogger::m_reportLevel
IssueSeverity::Level m_reportLevel
Definition: IssueLogger.h:32
std::string
STL class.
std::string::at
T at(T...args)
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:117
IssueSeverity::Level
Level
Definition: IssueSeverity.h:46
Gaudi::Property::value
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:475
IssueLogger::m_traceLevel
IssueSeverity::Level m_traceLevel
Definition: IssueLogger.h:32
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
IssueSeverity::WARNING
Definition: IssueSeverity.h:54

void IssueLogger::setupStreams | ( | Gaudi::Details::PropertyBase & | prop | ) |
| private

Definition at line 199 of file IssueLogger.cpp.

200 {
201
202 Gaudi::Property<std::vector<std::string>>* sap = dynamic_cast<Gaudi::Property<std::vector<std::string>>*>( &prop );
203 if ( !sap ) {
204 error() << "Could not convert " << prop.name()
205 << "to a Gaudi::Property<std::vector<std::string>> (which it should be!)" << endmsg;
206 return;
207 }
208 for ( const auto& s : sap->value() ) {
209 if ( connect( s ).isFailure() ) {
210 error() << "Could not setup stream " << s << endmsg;
211 }
212 }
213 }
IssueLogger::connect
StatusCode connect(const std::string &)
Definition: IssueLogger.cpp:98
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:314
Gaudi::Details::PropertyBase::name
const std::string name() const
property name
Definition: Property.h:40
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:84
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:117
gaudirun.s
string s
Definition: gaudirun.py:245
Gaudi::Property::value
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:475
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

## Member Data Documentation

std::array<logger_t, IssueSeverity::NUM_LEVELS> IssueLogger::m_log
| private

Definition at line 49 of file IssueLogger.h.

Gaudi::Property<std::vector<std::string> > IssueLogger::m_outputfile {this, "Output"}
| private

Definition at line 27 of file IssueLogger.h.

IssueSeverity::Level IssueLogger::m_reportLevel
| private

Definition at line 32 of file IssueLogger.h.

Gaudi::Property<std::string> IssueLogger::m_reportLevelS {this, "ReportLevel", "WARNING"}
| private

Definition at line 28 of file IssueLogger.h.

Gaudi::Property<bool> IssueLogger::m_showTime {this, "ShowTime", false}
| private

Definition at line 30 of file IssueLogger.h.

IssueSeverity::Level IssueLogger::m_traceLevel
| private

Definition at line 32 of file IssueLogger.h.

Gaudi::Property<std::string> IssueLogger::m_traceLevelS {this, "TracebackLevel", "ERROR"}
| private

Definition at line 29 of file IssueLogger.h.

The documentation for this class was generated from the following files:

- GaudiMonitor/src/IssueLogger.h
- GaudiMonitor/src/IssueLogger.cpp