ATLAS Offline Software
Loading...
Searching...
No Matches
AthMessaging.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5// AthMessaging.cxx
6// Implementation file for class AthMessaging
7// Author: S.Binet<binet@cern.ch>, Frank Winklmeier
9
12
13AthMessaging::AthMessaging (IMessageSvc* msgSvc,
14 const std::string& name) :
15 m_nm(name), m_imsg(msgSvc)
16{}
17
18
19AthMessaging::AthMessaging (const std::string& name) :
20 m_nm(name)
21{}
22
23
26
27
28void AthMessaging::setLevel (MSG::Level lvl)
29{
30 m_lvl = lvl;
31}
32
33
40{
42 // If user did not set an explicit level, set a default
43 if (m_lvl == MSG::NIL) {
44 m_lvl = m_imsg ?
45 static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
46 MSG::INFO;
47 }
48}
void setLevel(MSG::Level lvl)
Change the current logging level.
std::string m_nm
Message source name.
AthMessaging()
Default constructor:
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
virtual ~AthMessaging()
Destructor:
std::atomic< MSG::Level > m_lvl
Current logging level.
void initMessaging() const
Initialize our message level and MessageSvc.
singleton-like access to IMessageSvc via open function and helper
IMessageSvc * getMessageSvc(bool quiet=false)