Commit Graph

19 Commits

Author SHA1 Message Date
Tudor Brindus 363bf44a35 util/time: move `timespec_sub` to time utilities 2020-06-06 00:09:19 +02:00
Tudor Brindus 5c942bd597 util/log: use bright black rather than black for WLR_DEBUG
On some terminals under default settings, black is truly rendered as
`#000`, making it unreadable when the background is also black.

Refs swaywm/sway#5141.
2020-05-24 14:53:40 +02:00
Simon Ser 904312a0b2 util/log: write log importance
When colors aren't used, write the log importance to stderr. This makes
it easier to grep for errors and avoids mistaking error messages for
debug messages.
2020-05-01 16:45:57 +02:00
Simon Ser e7f8cc6801 util/log: improve time prefix
Log milliseconds. This is useful when debugging a rendering loop.

Print the time relative to the compositor start-up.
2020-03-07 00:25:01 +01:00
Simon Ser ca45f4490c Remove all wayland-server.h includes
The documentation for wayland-server.h says:

> Use of this header file is discouraged. Prefer including
> wayland-server-core.h instead, which does not include the server protocol
> header and as such only defines the library PI, excluding the deprecated API
> below.

Replacing wayland-server.h with wayland-server-core.h allows us to drop the
WL_HIDE_DEPRECATED declaration.
2019-07-27 15:49:32 -04:00
Manuel Stoeckl bb05617414 Use -fmacro-prefix-map to strip build path
This commit matches sway's 2dc4978d8af326c310057ca8fd22a4c7f5d09335.

To help ensure a reproducible build (when debug info is disabled),
the meson build script now uses the -fmacro-prefix-map command line
argument supported by GCC to strip the build-path dependent bytes
of each __FILE__ string used by wlr_log and related functions.

A rather ugly algorithm is used to compute the relative path between
the build and source folders, because meson has no specific function
for this.

When the compiler does not support -fmacro-prefix-map, fall back
to shifting the start of each __FILE__ string by the length of the
relative path to the source directory.
2019-07-17 21:00:09 -04:00
emersion 43bd1d807a util/log: setup wayland log handler 2019-04-07 16:09:00 -06:00
random human e44ab5d584
Add function wlr_log_get_verbosity()
Returns the verbosity passed to wlr_log_init().
2018-09-01 21:03:52 +05:30
emersion 7cbef15206
util: add wlr_ prefix to log symbols 2018-07-09 22:49:54 +01:00
emersion b0d99f5c67
Remove wlr_ prefix from local symbols 2018-04-25 23:00:46 +01:00
Guido Günther 2688f6163f Rename _strip_path to wlr_strip_path
since it's a public function
2018-02-21 10:25:52 +01:00
Drew DeVault 1d9be89e2d
Revert "ELF Visibility" 2018-02-19 18:01:27 -05:00
Scott Anderson 86269052eb Explicitly export EFL symbols 2018-02-19 14:26:40 +13:00
emersion c2e1474010
Reformat all #include directives 2018-02-12 21:29:23 +01:00
Calvin Lee 5a26ed645a Allow configurable verbosity 2017-12-31 14:50:19 -07:00
Greg V a5fe9aa736 Add FreeBSD compatibility 2017-10-11 00:07:21 +03:00
Drew DeVault 359042081f Fix #40 2017-08-02 22:57:50 -04:00
Drew DeVault b93f00b92f Utilize wlr_log in example logging 2017-06-21 14:15:06 -04:00
Drew DeVault f4453d104d Reorganize wlr-common 2017-06-21 12:10:07 -04:00
Renamed from common/log.c (Browse further)