Skip to content

Commit

Permalink
Make the loglevel of the daemonizer configurable (#4276)
Browse files Browse the repository at this point in the history
The loglevel of the daemonizer, currently `circus`, was hardcoded in the
code of the daemon client `aiida.engine.daemon.client.DaemonClient`,
even though the configuration options already provided a way to change
the logging level for the `circus` logger. The hardcoded value is now
replaced by fetching the value from the profile configuration.
  • Loading branch information
unkcpz authored Jul 21, 2020
1 parent 0d7baa5 commit a5829e0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions aiida/engine/daemon/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import socket
import tempfile

from aiida.manage.configuration import get_config
from aiida.manage.configuration import get_config, get_config_option

VERDI_BIN = shutil.which('verdi')
# Recent versions of virtualenv create the environment variable VIRTUAL_ENV
Expand Down Expand Up @@ -63,7 +63,6 @@ class DaemonClient: # pylint: disable=too-many-public-methods
DAEMON_ERROR_TIMEOUT = 'daemon-error-timeout'

_DAEMON_NAME = 'aiida-{name}'
_DEFAULT_LOGLEVEL = 'INFO'
_ENDPOINT_PROTOCOL = ControllerProtocol.IPC

def __init__(self, profile):
Expand Down Expand Up @@ -103,7 +102,7 @@ def cmd_string(self):

@property
def loglevel(self):
return self._DEFAULT_LOGLEVEL
return get_config_option('logging.circus_loglevel')

@property
def virtualenv(self):
Expand Down

0 comments on commit a5829e0

Please sign in to comment.