mirror of
https://github.com/swaywm/sway.git
synced 2025-11-09 13:29:49 -05:00
Add get_log_level() to encapsulate v (current log level)
This patch also makes all global variable in log.c static.
This commit is contained in:
parent
d3c947676d
commit
26842ff383
3 changed files with 9 additions and 6 deletions
|
|
@ -12,8 +12,6 @@
|
|||
#include <stringop.h>
|
||||
#include "workspace.h"
|
||||
|
||||
extern log_importance_t v;
|
||||
|
||||
/* XXX:DEBUG:XXX */
|
||||
static void container_log(const swayc_t *c, int depth) {
|
||||
fprintf(stderr, "focus:%c",
|
||||
|
|
@ -49,7 +47,7 @@ static void container_log(const swayc_t *c, int depth) {
|
|||
fprintf(stderr, "name:%.16s\n", c->name);
|
||||
}
|
||||
void layout_log(const swayc_t *c, int depth) {
|
||||
if (L_DEBUG > v) return;
|
||||
if (L_DEBUG > get_log_level()) return;
|
||||
int i, d;
|
||||
int e = c->children ? c->children->length : 0;
|
||||
container_log(c, depth);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue