mirror of https://github.com/nucypher/nucypher.git
commit
c5db2b5301
|
@ -298,6 +298,7 @@ commands:
|
||||||
command: |
|
command: |
|
||||||
mkdir -p ~/test-logs/
|
mkdir -p ~/test-logs/
|
||||||
mv ~/.cache/nucypher/log/nucypher.log ~/test-logs/nucypher-container-$CIRCLE_NODE_INDEX.log
|
mv ~/.cache/nucypher/log/nucypher.log ~/test-logs/nucypher-container-$CIRCLE_NODE_INDEX.log
|
||||||
|
when: always
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: ~/test-logs/
|
path: ~/test-logs/
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ GNU Affero General Public License for more details.
|
||||||
You should have received a copy of the GNU Affero General Public License
|
You should have received a copy of the GNU Affero General Public License
|
||||||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||||
"""
|
"""
|
||||||
|
from contextlib import contextmanager
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
import pathlib
|
import pathlib
|
||||||
|
|
||||||
|
@ -79,6 +79,16 @@ class GlobalLoggerSettings:
|
||||||
def stop_console_logging(cls):
|
def stop_console_logging(cls):
|
||||||
globalLogPublisher.removeObserver(console_observer)
|
globalLogPublisher.removeObserver(console_observer)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
@contextmanager
|
||||||
|
def pause_console_logging_while(cls):
|
||||||
|
was_already_going = console_observer in globalLogPublisher._observers
|
||||||
|
if was_already_going:
|
||||||
|
globalLogPublisher.removeObserver(console_observer)
|
||||||
|
yield
|
||||||
|
if was_already_going:
|
||||||
|
globalLogPublisher.addObserver(console_observer)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def start_text_file_logging(cls):
|
def start_text_file_logging(cls):
|
||||||
globalLogPublisher.addObserver(get_text_file_observer())
|
globalLogPublisher.addObserver(get_text_file_observer())
|
||||||
|
|
Loading…
Reference in New Issue