FUNCTIONmountaineer.logging.setup_logger
setup_logger
Constructor for the main logger used by Mountaineer. Provided convenient defaults for log level and formatting, alongside coloring of stdout/stderr messages and JSON fields for structured parsing.
Parameters
- Name
name
- Type
- Description
- Name
log_level
- Type
- Description
Default: logging.DEBUG
FUNCTIONmountaineer.logging.log_time_duration
log_time_duration
Context manager to time a code block at runtime.
Code
with log_time_duration("Long computation"): # Simulate work sleep(10)
Parameters
- Name
message
- Type
- str
- Description