MCPcopy Index your code
hub / github.com/hyperopt/hyperopt / _get_logger

Function _get_logger

hyperopt/utils.py:25–33  ·  view source on GitHub ↗

Gets a logger by name, or creates and configures it for the first time.

(name)

Source from the content-addressed store, hash-verified

23
24
25def _get_logger(name):
26 """Gets a logger by name, or creates and configures it for the first time."""
27 logger = logging.getLogger(name)
28 logger.setLevel(logging.INFO)
29 # If the logger is configured, skip the configure
30 if not logger.handlers and not logging.getLogger().handlers:
31 handler = logging.StreamHandler(sys.stderr)
32 logger.addHandler(handler)
33 return logger
34
35
36logger = _get_logger(__name__)

Callers 2

spark.pyFile · 0.90
utils.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected