Remove GroupGeneralConfig attributes asignment and replace it with method calls

Attributes don't do anything anymore
pull/1434/head
Bogdan Opanchuk 2019-11-07 00:31:02 -08:00 committed by David Núñez
parent 6a5a7d9ec2
commit 8e11c96054
3 changed files with 1 additions and 17 deletions

View File

@ -11,10 +11,6 @@ from nucypher.cli.processes import JSONRPCLineReceiver
class TransportTrap:
"""Temporarily diverts system standard output"""
# Disable click sentry and file logging
GroupGeneralConfig.log_to_sentry = False
GroupGeneralConfig.log_to_file = True
def __init__(self):
self.___stdout = sys.stdout
self.buffer = deque()

View File

@ -8,10 +8,6 @@ from nucypher.characters.control.emitters import StdoutEmitter
from nucypher.cli.config import GroupGeneralConfig
from nucypher.cli.processes import UrsulaCommandProtocol
# Override environment variables
GroupGeneralConfig.log_to_sentry = False
GroupGeneralConfig.log_to_file = False
@contextmanager
def capture_output():

View File

@ -24,15 +24,6 @@ from nucypher.utilities.logging import GlobalLoggerSettings
from nucypher.utilities.sandbox.constants import INSECURE_DEVELOPMENT_PASSWORD
#
# Global Session Mock & Patch
#
# Disable click sentry and file logging
GroupGeneralConfig.log_to_sentry = False
GroupGeneralConfig.log_to_file = True
# Crash on server error by default
WebEmitter._crash_on_error_default = True
@ -129,6 +120,7 @@ def pytest_collection_modifyitems(config, items):
log_level_name = config.getoption("--log-level", "info", skip=True)
GlobalLoggerSettings.stop_sentry_logging()
GlobalLoggerSettings.set_log_level(log_level_name)
GlobalLoggerSettings.start_text_file_logging()
GlobalLoggerSettings.start_json_file_logging()