declearn.utils.get_logger
Create or access a logging.Logger instance with pre-set handlers.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
Name of the logger (used to create or retrieve it). |
required |
level |
int
|
Logging level below which messages are filtered out. |
logging.INFO
|
fpath |
Optional[str]
|
Optional path to a utf-8 text file to which to append logged messages (in addition to stream display). |
None
|
s_fmt |
Optional[str]
|
Optional format string applied to the handlers. If None, use the default format set by declearn. |
None
|
Returns:
Name | Type | Description |
---|---|---|
logger |
logging.Logger
|
Retrieved or created Logger, with a StreamHandler, opt. a FileHandler, and possibly more (if pre-existing). |
Source code in declearn/utils/_logging.py
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 86 87 88 |
|