dnsight.core
dnsight.core
Core types, enums, and utilities for dnsight.
configure(level=logging.INFO, format_string=None, *, detailed_log=False, use_rich=False, rich_tracebacks=False)
Attach a single handler on the dnsight root logger.
Replaces any existing handlers on that logger so repeated calls do not stack handlers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
level
|
int
|
Minimum level for the logger and handler. |
INFO
|
format_string
|
str | None
|
If set, used with a plain :class: |
None
|
detailed_log
|
bool
|
When format_string is unset and use_rich is False,
include |
False
|
use_rich
|
bool
|
Use :class: |
False
|
rich_tracebacks
|
bool
|
When use_rich is True, render exception tracebacks with Rich (only affects records with exception info). |
False
|
Source code in src/dnsight/core/logger.py
get_logger(name=None)
Return the package logger. Singleton-style: same name => same logger.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
If None, returns the root package logger "dnsight". If provided,
returns "dnsight. |
None
|
Returns:
| Type | Description |
|---|---|
Logger
|
The Logger instance. |