From 4b48ac64597c8a2710a693b949a305345ab7baeb Mon Sep 17 00:00:00 2001 From: Keith James Date: Fri, 1 Nov 2024 15:40:02 +0000 Subject: [PATCH] Add note about logging --- src/npg/conf.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/npg/conf.py b/src/npg/conf.py index 03dea3c..ede49c0 100644 --- a/src/npg/conf.py +++ b/src/npg/conf.py @@ -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 = ""):