Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved widgets for log's configuration options #318

Closed
AntiD2ta opened this issue Jan 21, 2020 · 2 comments
Closed

Improved widgets for log's configuration options #318

AntiD2ta opened this issue Jan 21, 2020 · 2 comments
Assignees
Labels
gui Problem with the Graphic User Interface
Milestone

Comments

@AntiD2ta
Copy link
Contributor

AntiD2ta commented Jan 21, 2020

Is your feature request related to a problem? Please describe.
Currently the log's configuration options are modified in Settings view using TextFields in PR #317 . This is not the best choice because the user can insert wrong options and there is no way of suggest possible options.

Describe the solution you'd like
There is two configuration options for logs.

  1. Log Level
  2. Log Output

For Log Level it would be fine a Combo Box with all possible values:

  • debug
  • info or notice
  • warn or warning
  • error
  • fatal or critical
  • panic

For Log Output it would be fine a set of Radio Buttons with these possible values:

  • stdout
  • stderr
  • none
  • file

If option file is marked, then a dialog box or a hidden TextField should appear to insert the path to file where logs would be written

Additional context

  • The current TextFields are wired up with the configurationManager in backend model
  • This is a side problem of issue Log app events to file #298

This was my initial implementation of the log level Combo Box:

RowLayout {
            Layout.fillWidth: true
            
                text: qsTr("Log level")
                font.bold: true
            Label {
                color: Material.accent
            }

                id: logLevelOption
            ComboBox{
                // When an item is selected, update the backend.
                onActivated: logLevel.modifier = qsTr(logLevelOption.currentValue)

                // // Set the initial currentIndex to the value stored in the backend.
                // Component.onCompleted: currentIndex = indexOfValue(logLevel.old)
            }
                model:["debug", "info", "warn", "error", "fatal", "panic"]
        }
@AntiD2ta AntiD2ta added the gui Problem with the Graphic User Interface label Jan 21, 2020
@AntiD2ta AntiD2ta added this to the 0.27.0 milestone Jan 21, 2020
@AntiD2ta AntiD2ta added this to To do in FiberCrypto wallet - Iteration 1 via automation Jan 21, 2020
@stdevCrow
Copy link
Contributor

Thanks @stdevAntiD2ta I will start with this tomorrow.

AntiD2ta added a commit to simelo/fibercryptowallet that referenced this issue Jan 26, 2020
AntiD2ta added a commit to simelo/fibercryptowallet that referenced this issue Jan 26, 2020
… for log level

This function returns a logrus.level from an enum identifier.
AntiD2ta added a commit to simelo/fibercryptowallet that referenced this issue Jan 26, 2020
AntiD2ta added a commit to simelo/fibercryptowallet that referenced this issue Feb 5, 2020
AntiD2ta added a commit to simelo/fibercryptowallet that referenced this issue Feb 5, 2020
…pipeline

Changes:
- Add a enum for output options
- In case that output is `File`, call to GetFileToLog is postponed to when outputFile option is get from the configuration options
- Changes permission of file .log created to 0344 (old: 0600)
AntiD2ta added a commit to simelo/fibercryptowallet that referenced this issue Feb 5, 2020
… when settings are saved

When the output change from stderr to File(for example) the logs are written to the file with a weird format, in the other way, logs aren't written to the console
AntiD2ta added a commit to simelo/fibercryptowallet that referenced this issue Feb 5, 2020
@stdevMac
Copy link
Member

Already solved here

FiberCrypto wallet - Iteration 1 automation moved this from To do to Done Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gui Problem with the Graphic User Interface
Development

No branches or pull requests

3 participants