Skip to content

logs_view

frog.gui.logs_view ¤

Code for FROG's logs menu.

Classes¤

LogLocationOpen(parent) ¤

Bases: QAction

A menu option for opening the log file folder location.

Create a menu item for opening the log file folder location.

Parameters:

Name Type Description Default
parent QObject

the menu on which to place the menu item

required
Source code in frog/gui/logs_view.py
33
34
35
36
37
38
39
40
def __init__(self, parent: QObject) -> None:
    """Create a menu item for opening the log file folder location.

    Args:
        parent: the menu on which to place the menu item
    """
    super().__init__("Open file location", parent)
    self.triggered.connect(self.open_file_location)
Functions¤
open_file_location() ¤

Opens the log file folder location.

Source code in frog/gui/logs_view.py
42
43
44
45
def open_file_location(self) -> None:
    """Opens the log file folder location."""
    path = os.path.realpath(get_log_path())
    QDesktopServices.openUrl(QUrl.fromLocalFile(path))

LogOpen(parent) ¤

Bases: QAction

A menu option for opening the current log file.

Create a menu item for opening the current log file.

Parameters:

Name Type Description Default
parent QObject

the menu on which to place the menu item

required
Source code in frog/gui/logs_view.py
14
15
16
17
18
19
20
21
def __init__(self, parent: QObject) -> None:
    """Create a menu item for opening the current log file.

    Args:
        parent: the menu on which to place the menu item
    """
    super().__init__("Open log", parent)
    self.triggered.connect(self.open_log)
Functions¤
open_log() ¤

Opens the current log file.

Source code in frog/gui/logs_view.py
23
24
25
26
27
def open_log(self) -> None:
    """Opens the current log file."""
    from frog.logger import log_file

    QDesktopServices.openUrl(QUrl.fromLocalFile(log_file))

Functions¤