Commit 305ca5a4 authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Reconfigure logging if the logging channel is changed

and add documentation about the feature. Refs #29987
parent e5e4b24d
...@@ -953,6 +953,9 @@ void ConfigServiceImpl::setString(const std::string &key, ...@@ -953,6 +953,9 @@ void ConfigServiceImpl::setString(const std::string &key,
cacheInstrumentPaths(); cacheInstrumentPaths();
} else if (key == "defaultsave.directory") { } else if (key == "defaultsave.directory") {
appendDataSearchDir(value); appendDataSearchDir(value);
} else if (key == "logging.channels.consoleChannel.class") {
// this key requires reloading logging for it to take effect
configureLogging();
} }
m_notificationCenter.postNotification(new ValueChanged(key, value, old)); m_notificationCenter.postNotification(new ValueChanged(key, value, old));
......
...@@ -136,7 +136,13 @@ you may want to alter and those properties are detailed below. ...@@ -136,7 +136,13 @@ you may want to alter and those properties are detailed below.
| |The default is information, but | ``error``, ``critical`` | | |The default is information, but | ``error``, ``critical`` |
| |this can be lowered to debug for more detailed | or ``fatal`` | | |this can be lowered to debug for more detailed | or ``fatal`` |
| |feedback. | | | |feedback. | |
| | | | +-------------------------------------------------+---------------------------------------------------+-----------------------------+
| ``logging.channels.consoleChannel.class`` | Select where log messages appear. | ``ConsoleChannel``, |
| | ``ConsoleChannel`` writes to stdlog. | ``StdoutChannel``, or |
| | ``StdoutChannel`` writes to stdout and can be | ``PythonStdoutChannel`` |
| | redirected using pipes. | |
| | ``PythonStdoutChannel`` writes to stdout through | |
| | python and is visible in jupyter notebooks. | |
+-------------------------------------------------+---------------------------------------------------+-----------------------------+ +-------------------------------------------------+---------------------------------------------------+-----------------------------+
The logging priority levels for the file logging and console logging can also be adjusted in python using the command: The logging priority levels for the file logging and console logging can also be adjusted in python using the command:
......
...@@ -15,6 +15,7 @@ Concepts ...@@ -15,6 +15,7 @@ Concepts
- Change sphinx documentation to use mathjax to render equations - Change sphinx documentation to use mathjax to render equations
- Added packing fraction to :ref:`Material <Materials>` to separate number density and effective number density. - Added packing fraction to :ref:`Material <Materials>` to separate number density and effective number density.
- Added a feature allowing time-dependent values for individual instrument parameters. - Added a feature allowing time-dependent values for individual instrument parameters.
- Added a ``PythonStdOutChannel`` and the ability to change the :ref:`logging channel <Properties File>` without restarting mantid framework
Algorithms Algorithms
---------- ----------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment