Age | Commit message (Collapse) | Author |
|
Because meson does not provide a simple way to get the relative build
path, it is computed with a pair of foreach loops. As meson does not
have a simple way to compute string length (except via underscorify
and 63 split operations), the build script uses a shell command
instead.
If the compiler does not suppot -fmacro-prefix-map, then fall back
to passing in the relative path prefix, and use its length to offset
the uses of __FILE__ in log messages so that the build path is at
least still not included in the logs. This is significantly more
efficient than calling _sway_strip_path.
|
|
This commit mostly duplicates the wlr_log functions, although
with a sway_* prefix. (This is very similar to PR #2009.)
However, the logging function no longer needs to be replaceable,
so sway_log_init's second argument is used to set the exit
callback for sway_abort.
wlr_log_init is still invoked in sway/main.c
This commit makes it easier to remove the wlroots dependency for
the helper programs swaymsg, swaybg, swaybar, and swaynag.
|
|
This is a non-standard extension as well as completely useless in C.
__func__ is the standard way of doing this.
|
|
|
|
|
|
Keep sway_abort and sway_assert and convert them to use wlr_log
functions
|
|
|
|
|
|
|
|
_sway_assert is a variadic function which tries
to delegate to another variadic function. This
requires a vprintf-style variant of the delegate.
https://stackoverflow.com/a/150616
|
|
|
|
This patch also makes all global variable in log.c static.
|
|
This removes most preprocessor logic, leaving it only it the header.
|
|
Ref #270
|
|
|
|
Replicates i3 option. Verbosity level given as command line argument
becomes default log level, and using 'debuglog toggle' switches back and
forth between default and debug (or L_ERROR and debug if default is also
L_DEBUG).
|
|
swayc_log works just like sway_log, but appends type and name from given
container to the log output.
|
|
|
|
|
|
|
|
|
|
|
|
returns false on a failed assertion in release mode and raises SIGABRT in debug mode
|
|
|
|
|