Skip to content

Add logging #12

@vidvidex

Description

@vidvidex

It would be nice for the scripts to write a log file of user's interactions and command output for easier debugging.

The main problem with implementing this is that we're using Whiptail for the TUI. This limits the "obvious" ways for implementing logging:

  • we cannot just pipe everything that is shown on stdout to a file because we don't want to log the TUI control symbols as well
  • we could redirect all echos/printfs and all command output to a log file, but this is very error prone. It is very easy to forget a redirect, meaning the log files wouldn't have all the logs
  • we could play around with file streams and somehow make it so that whiptail is only printed on screen, while echos and command output is printed to screen and to a file. I've tried this quickly but then whiptail didn't work as expected (didn't read options from the subscripts directory)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions