Skip to content

Commit

Permalink
Merge pull request #14 from kjsanger/doc/config
Browse files Browse the repository at this point in the history
Add note about logging
  • Loading branch information
kjsanger authored Nov 1, 2024
2 parents 98716bf + 4b48ac6 commit 21b0b9f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/npg/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ class ServerConfig:
The class provides INFO level logging of its actions to enable loading of
configurations to be traced.
If your dataclass includes sensitive information, you should take care to ensure
that the fields are not logged. This can be done by declaring the field with
metadata:
@dataclass
class ServerConfig:
admin-token: str = field(repr=False)
"""

def __init__(self, cls: D, use_env: bool = False, env_prefix: str = ""):
Expand Down

0 comments on commit 21b0b9f

Please sign in to comment.