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

i3bar: DLOGs before verbose is configured can never be printed #3220

Closed
orestisfl opened this issue Apr 3, 2018 · 6 comments · Fixed by #3244
Closed

i3bar: DLOGs before verbose is configured can never be printed #3220

orestisfl opened this issue Apr 3, 2018 · 6 comments · Fixed by #3244
Labels
4.15 accepted Has been approved and is ok to start working on enhancement good first issue missing-log Read the CONTRIBUTING.md file for instructions

Comments

@orestisfl
Copy link
Member

i3 4.15

Ironically, this includes the DLOG that announces the verbose configuration:

i3/i3bar/src/config.c

Lines 307 to 309 in bc760c2

DLOG("verbose = %d\n", val);
config.verbose = val;
return 1;

I propose adding a --verbose flag

@i3bot
Copy link

i3bot commented Apr 3, 2018

I don’t see a link to logs.i3wm.org. Did you follow https://i3wm.org/docs/debugging.html? (In case you actually provided a link to a logfile, please ignore me.)

@i3bot i3bot added missing-log Read the CONTRIBUTING.md file for instructions 4.15 labels Apr 3, 2018
@orestisfl
Copy link
Member Author

Did you follow https://i3wm.org/docs/debugging.html?

That's why I am here!

@Airblader
Copy link
Member

I propose adding a --verbose flag

Not sure I understand(?) We do already have -V (not -v since that's for the version).

@orestisfl
Copy link
Member Author

We don't have a -V for i3bar:

i3/i3bar/src/main.c

Lines 111 to 128 in bc760c2

while ((opt = getopt_long(argc, argv, "b:s:hv", long_opt, &option_index)) != -1) {
switch (opt) {
case 's':
socket_path = expand_path(optarg);
break;
case 'v':
printf("i3bar version " I3_VERSION " © 2010 Axel Wagner and contributors\n");
exit(EXIT_SUCCESS);
break;
case 'b':
config.bar_id = sstrdup(optarg);
break;
default:
print_usage(argv[0]);
exit(EXIT_SUCCESS);
break;
}
}

@Airblader
Copy link
Member

Oops. :-) I think adding such a flag is fine.

@Airblader Airblader added enhancement accepted Has been approved and is ok to start working on good first issue labels Apr 4, 2018
hwangcc23 added a commit to hwangcc23/i3 that referenced this issue Apr 10, 2018
hwangcc23 added a commit to hwangcc23/i3 that referenced this issue Apr 11, 2018
hwangcc23 added a commit to hwangcc23/i3 that referenced this issue Apr 13, 2018
@orestisfl
Copy link
Member Author

#3236

@orestisfl orestisfl reopened this Apr 15, 2018
orestisfl added a commit to orestisfl/i3 that referenced this issue Apr 15, 2018
When i3bar is called with the -V flag but there is no 'verbose yes'
directive in the bar {} config, the verbosity config value is reset.

This will introduce the opposite, negligible issue: you can't disable
i3bar's verbosity by deleting the 'verbose yes' directive in the bar {}
config. To fix this we would need an enum for config.verbose.

Closes i3#3220.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.15 accepted Has been approved and is ok to start working on enhancement good first issue missing-log Read the CONTRIBUTING.md file for instructions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants