Skip to content

Add optional logging to a log file for debugging purposes #42

@Adda0

Description

@Adda0

Problem

If any errors occur, it is important to have a good debugging tools to identify the issue and be able to find a solution as quickly as possible.

Issue #41 shows that we lack such tools as of now, which would allow our users to easily send us reliable and useful information about the bugs they encounter.

Solution

We should have a new application mode (verbose, debug or something similar). This debug mode would, except for a normal handling of key events, output every such operation in a nicely formatted way to a log file. The log file would provide a debugging information which could be shared with the developers to make their life easier when trying to fix an issue.

The basics are already present in the code in a form of commented out prints (e.g., this or this one). These prints should be redirected to a log file, and other prints could be added to provide even more information about the state of the program.

Of course, such verbose logging should be active only when specifically requested by the user when they run into any issues. I believe the logging mode could be activated by a specific parameter passed to make or even as a parameter passed to systemctl. Other variants are possible as well.

Steps

  • Add debug prints,
  • Create log file if needed,
  • Specify a way of activating and deactivating verbose logging mode and
  • Redirect logs to a log file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions