-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feature/PI-342-redact_logging_fields Updated logger to redact * feature/PI-342-redact_logging_fields testing auth logger redaction * feature/PI-342-redact_logging_fields removed auth test * feature/PI-376-branch_needs_main_rebase Added rebase main check * release/2024-05-31 Created release branch * release/2024-05-31 increase boto3 retries as causing transient errors * release/2024-05-31 pass missing tests params * release/2024-05-31 pass missing tests params * release/2024-05-31 pass missing tests params again * release/2024-05-31 pass missing tests params again * release/2024-05-31 fix int tests --------- Co-authored-by: Rowan Gill <[email protected]>
- Loading branch information
1 parent
69a1a23
commit bbcc01a
Showing
11 changed files
with
99 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2024.05.29 | ||
2024.05.31 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- [PI-342] Add redacted-fields to context loggers | ||
- [PI-376] Check releases fully rebased on main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
LDAP_REDACTED_FIELDS = {"ldap_changelog_password", "ldap_changelog_user", "ldap_host"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
from pathlib import Path | ||
from typing import Set | ||
from uuid import uuid4 | ||
|
||
from nhs_context_logging import app_logger | ||
|
||
|
||
def setup_logger(service_name: str, uuid: str = None): | ||
def setup_logger(service_name: str, uuid: str = None, redacted_fields: Set[str] = None): | ||
service_name = Path(service_name).parent.stem | ||
if uuid is None: | ||
uuid = str(uuid4()) | ||
app_logger._is_setup = False | ||
app_logger.setup( | ||
service_name="-".join((service_name, uuid)), | ||
config_kwargs={"prepend_module_name": True}, | ||
redact_fields=redacted_fields, | ||
) |