Log Setup
Logging setup for CodeMap.
This module configures logging for different parts of the CodeMap application, ensuring logs are stored in the appropriate directories.
console
module-attribute
console = Console()
setup_logging
setup_logging(
is_verbose: bool = False,
log_to_console: bool = True,
log_file_path: Path | str | None = None,
log_level_default: int = ERROR,
log_level_verbose: int = DEBUG,
) -> None
Set up logging configuration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
is_verbose
|
bool
|
Enable verbose logging |
False
|
log_to_console
|
bool
|
Whether to log to the console |
True
|
log_file_path
|
Path | str | None
|
Optional path to a file for logging. If None, no file logging. |
None
|
log_level_default
|
int
|
The log level to use for default logging. |
ERROR
|
log_level_verbose
|
int
|
The log level to use for verbose logging. |
DEBUG
|
Source code in src/codemap/utils/log_setup.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
|