Add safe_logs option to anonymise logs. (#264)

* Add safe_logs option to anonymise logs.

* Extend logger class.
This commit is contained in:
tecnovert
2025-02-22 15:54:13 +00:00
committed by GitHub
parent 8d317e4b67
commit f1c2b41714
13 changed files with 735 additions and 805 deletions

View File

@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2019-2024 tecnovert
# Copyright (c) 2024 The Basicswap developers
# Copyright (c) 2024-2025 The Basicswap developers
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
@@ -28,6 +28,9 @@ from .rpc import (
from .util import (
TemporaryError,
)
from .util.logging import (
BSXLogger,
)
from .chainparams import (
Coins,
chainparams,
@@ -75,6 +78,7 @@ class BaseApp(DBMethods):
self.delay_event.set()
def prepareLogging(self):
logging.setLoggerClass(BSXLogger)
self.log = logging.getLogger(self.log_name)
self.log.propagate = False