Logging
Utility functions for logging.
get_version_information()
¶
Get the version information.
Returns:
| Type | Description |
|---|---|
str
|
Version information. |
Source code in src/python_package_template/utils/log.py
11 12 13 14 15 16 17 18 | |
setup_logger(outdir='.', label=None, log_level='INFO', print_version=False)
¶
Set up logging output: call at the start of the script to use.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
outdir
|
str
|
Output directory for log file. |
'.'
|
label
|
str | None
|
Label for log file name. If None, no log file is created. |
None
|
log_level
|
str | int
|
Logging level as string or integer. |
'INFO'
|
print_version
|
bool
|
Whether to print version information to the log. |
False
|
Source code in src/python_package_template/utils/log.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 | |