Fix executor verbosity (issue #699)

This commit is contained in:
Chris Lee 2018-04-17 19:48:55 +00:00
parent 131704081c
commit d1f5a46a73
4 changed files with 10 additions and 1 deletions

View file

@ -1,5 +1,8 @@
2018-04-17 master
- Update AUTHORS
- Fixes:
- Fix leak in image loading (issue #704)
- Executors no longer log unless env var DEBUG_EXECUTORS is set
2018-04-17 16.3
- Fixes:

View file

@ -20,6 +20,8 @@
#define MAX_TOOLTIP_LEN 4096
bool debug_executors = false;
void execp_timer_callback(void *arg);
char *execp_get_tooltip(void *obj);
void execp_init_fonts();
@ -635,7 +637,8 @@ void execp_timer_callback(void *arg)
close(pipe_fd_stderr[0]);
return;
} else if (child == 0) {
fprintf(stderr, "tint2: Executing: %s\n", execp->backend->command);
if (debug_executors)
fprintf(stderr, "tint2: Executing: %s\n", execp->backend->command);
// We are in the child
close(pipe_fd_stdout[0]);
dup2(pipe_fd_stdout[1], 1); // 1 is stdout

View file

@ -8,6 +8,8 @@
#include "common.h"
#include "timer.h"
extern bool debug_executors;
// Architecture:
// Panel panel_config contains an array of Execp, each storing all config options and all the state variables.
// Only these run commands.

View file

@ -106,6 +106,7 @@ void handle_env_vars()
debug_dnd = getenv("DEBUG_DND") != NULL;
debug_thumbnails = getenv("DEBUG_THUMBNAILS") != NULL;
debug_timers = getenv("DEBUG_TIMERS") != NULL;
debug_executors = getenv("DEBUG_EXECUTORS") != NULL;
if (debug_fps) {
init_fps_distribution();
char *s = getenv("TRACING_FPS_THRESHOLD");