Files
OpenBB/openbb_terminal/core/log/generation/common.py
Colin Delahunty 1ca7fd9beb Improves the settings/userdata command, and upgrade ruff (#5359)
* Began the fax

* Bumped ruff

* Fixed a BUNCH of ruff errors

* Fixed a lot of ruff errors

* Simplify if statements

* Fixed black

* Updated some stuff

* Updated some stuff

* A lot more ruff fixes

* Added a fix

* Added a fix

* Fixed mypy

* Fixed some stuff

* Reverted one thing

* Small fix

* Small fix

* Small fix

* Added fix

* Added fix

* Update requirements
2023-08-22 20:11:48 +00:00

18 lines
465 B
Python

# IMPORTATION STANDARD
import contextlib
import logging
# IMPORTATION THIRDPARTY
# IMPORTATION INTERNAL
from openbb_terminal.core.log.generation.path_tracking_file_handler import (
PathTrackingFileHandler,
)
def do_rollover():
"""RollOver the log file."""
for handler in logging.getLogger().handlers:
if isinstance(handler, PathTrackingFileHandler):
with contextlib.suppress(PermissionError):
handler.doRollover()