mirror of
https://github.com/labwc/labwc.git
synced 2026-06-15 14:33:48 -04:00
add logger for config errors and <core><errorCommand> to display it.
This commit is contained in:
parent
477b3b1ddb
commit
4efb63f7da
10 changed files with 233 additions and 11 deletions
21
include/common/log.h
Normal file
21
include/common/log.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef LABWC_LOG_H
|
||||
#define LABWC_LOG_H
|
||||
|
||||
#include <wlr/util/log.h>
|
||||
#include "common/buf.h"
|
||||
|
||||
struct buf *log_get_buf(void);
|
||||
void log_set_error(enum wlr_log_importance importance);
|
||||
void log_reset(void);
|
||||
void nag_show(void);
|
||||
void nag_show_callback(void *data);
|
||||
|
||||
#define nag_log(verb, fmt, ...) \
|
||||
do { \
|
||||
wlr_log(verb, fmt, ##__VA_ARGS__); \
|
||||
log_set_error(verb); \
|
||||
buf_add_fmt(log_get_buf(), fmt "\n", ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
#endif /* LABWC_LOG_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue