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

Correct message re: enabling logging #859

Merged
merged 1 commit into from
Nov 24, 2023
Merged

Correct message re: enabling logging #859

merged 1 commit into from
Nov 24, 2023

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Nov 23, 2023

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • [N/A] Tests for the changes have been added (for bug fixes / features)

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

If the v key is not set to true in the configuration file, Arduino Create Agent prints a seemingly helpful message to the terminal:

You can enter verbose mode to see all logging by starting with the -v command line switch.

However, it is not helpful after all because there is no -v command line flag. The sole mechanism for controlling logging is the v key of the configuration file. If the user follows the instructions they will get an error:

$ Arduino_Create_Agent -v
flag provided but not defined: -v
Usage of C:\Users\per\AppData\Roaming\ArduinoCreateAgent\Arduino_Create_Agent.exe:
  -additional-config string
       	config file path (default "config.ini")
  -gc string
       	Deprecated. Use the config.ini file (default "std")
  -generateCert
    
  -hibernate
       	start hibernated
  -ls
       	launch self 5 seconds later
  -regex string
       	Deprecated. Use the config.ini file (default "usb|acm|com")

What is the new behavior?

Change the message to specify the use of the configuration file instead of a non-existent flag.

Does this PR introduce a breaking change?

No

Other information

An alternative solution would be to implement the mythical -v flag. However, I don't think there is a need for such a flag.

The end users don't have any need to run Arduino Create Agent from the command line under normal usage, and when they are running it from the command line it is likely to be during troubleshooting, when logging will be useful. Since logging is enabled by default, it will be rare that a user would have the need to change the logging behavior.

If the `v` key is not set to `true` in the configuration file, Arduino Create Agent prints a helpful message to the
terminal.

Previously this message instructed the user to enable logging via a `-v` command line flag. However, Arduino Create
Agent doesn't have a `-v` flag. The sole mechanism for controlling logging is the `v` key of the configuration file.

The instructions in the message are hereby corrected to specify the use of the configuration file.
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Nov 23, 2023
@per1234 per1234 self-assigned this Nov 23, 2023
Copy link
Contributor

@umbynos umbynos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Per

@per1234 per1234 merged commit d4c4537 into arduino:main Nov 24, 2023
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants