ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Generators
PowhegControl
python
Generators/PowhegControl/python/Logging.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3
"""Simple fallback logging for PowhegControl when Athena is unavailable."""
4
5
try
:
6
from
AthenaCommon
import
Logging
as
_AthenaLogging
7
logging = _AthenaLogging.logging
8
getLogger = logging.getLogger
9
except
ImportError:
10
import
logging
as
_logging
11
12
if
not
_logging.root.handlers:
13
_handler = _logging.StreamHandler()
14
_handler.setFormatter(_logging.Formatter(
'[%(levelname)s] %(name)s: %(message)s'
))
15
_logging.root.addHandler(_handler)
16
_logging.root.setLevel(_logging.INFO)
17
18
logging = _logging
19
getLogger = _logging.getLogger
20
21
__all__ = [
'logging'
,
'getLogger'
]
Generated on
for ATLAS Offline Software by
1.17.0