aboutsummaryrefslogtreecommitdiffstats
path: root/common/log.c
Commit message (Collapse)AuthorAge
* Define _POSIX_C_SOURCE globallyLibravatar Simon Ser2024-02-23
| | | | See discussion in https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4555
* common/log: write log importanceLibravatar Simon Ser2020-12-10
| | | | | | | | | | 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. This is [1] ported to Sway. [1]: https://github.com/swaywm/wlroots/pull/2149
* common/log: use bright black rather than black for SWAY_DEBUGLibravatar Tudor Brindus2020-05-24
| | | | | | | On some terminals under default settings, black is truly rendered as `#000`, making it unreadable when the background is also black. Closes #5141.
* common/log: bump POSIX version used after e81d9fde667eLibravatar Jan Beich2020-03-07
| | | | | | | | | ../common/log.c:63:16: error: use of undeclared identifier 'CLOCK_MONOTONIC' clock_gettime(CLOCK_MONOTONIC, &start_time); ^ ../common/log.c:75:16: error: use of undeclared identifier 'CLOCK_MONOTONIC' clock_gettime(CLOCK_MONOTONIC, &ts); ^
* common/log: improve time prefixLibravatar Simon Ser2020-03-07
| | | | | | Same as [1]. [1]: https://github.com/swaywm/wlroots/pull/2052
* Use -fmacro-prefix-map to strip build pathLibravatar Manuel Stoeckl2019-07-15
| | | | | | | | | | | | | | 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.
* Replace wlr_log with sway_logLibravatar M Stoeckl2019-01-21
| | | | | | | | | | | | | 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.
* Update for swaywm/wlroots#1126Libravatar emersion2018-07-09
|
* common/log: finish removing most log functionsLibravatar Dominique Martinet2018-01-05
| | | | | Keep sway_abort and sway_assert and convert them to use wlr_log functions
* Move everything to sway/old/Libravatar Drew DeVault2017-11-18
|
* Print log level even if STDERR is not a ttyLibravatar Calvin Lee2017-10-20
| | | | | Makes reading debug logs much easier, debug lines will start with `E`, info lines with `I` and error lines with `E`.
* FreeBSD fixesLibravatar johalun2017-06-06
| | | | | | | Increase _POSIX_SOURCE value where needed. Increase _XOPEN_SOURCE value where needed. Conditionally link to libcap (only on Linux). Possibly some trailing whitespace fixes (automatic).
* Make sway_abort() report locationLibravatar Jerzi Kaminsky2017-04-20
|
* Fix location reported by sway_assertLibravatar Jerzi Kaminsky2017-04-16
|
* Fix variadic forwarding in sway_assertLibravatar Jerzi Kaminsky2017-04-16
| | | | | | | | _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
* UnGNUify the codebaseLibravatar Drew DeVault2017-03-10
|
* Handle malloc failure in ipc_recv_responseLibravatar Drew DeVault2016-12-15
|
* Reorganize includesLibravatar Drew DeVault2016-09-01
|
* Add timestamp to log messagesLibravatar Tony Crisci2016-07-28
|
* Remove SIGSERV and SIGABORT handlerLibravatar Drew DeVault2016-07-17
| | | | | From now on let's just let the core dumps happen and ask users to provide them.
* Add get_log_level() to encapsulate v (current log level)Libravatar David Eklov2016-06-27
| | | | This patch also makes all global variable in log.c static.
* common: refactor sway_log()Libravatar Eric Engestrom2016-05-02
| | | | This removes most preprocessor logic, leaving it only it the header.
* common: fix double-close in error_handler()Libravatar Eric Engestrom2016-05-02
|
* Fix off-by-one bug in log functionsLibravatar Eric Engestrom2016-05-02
|
* Correctly exit sway on errors.Libravatar Mikkel Oscar Lyderik2016-02-26
| | | | | | | | Calling `exit` in sway_terminate prevents sway from correctly shutting down (freeing data, cleanly terminating the ipc server, etc.). A better way is to exit straight away if the failure occurs before `wlc_run` and use sway_abort as usual if it occur when wlc is running.
* Fix clang warningsLibravatar Mikkel Oscar Lyderik2016-02-08
|
* Print /proc/<pid>/maps on segfaultLibravatar Drew DeVault2016-01-28
|
* use CMake's FindBacktrace for backtrace feature detectionLibravatar robotanarchy2015-12-21
|
* Start fleshing out wayland client implementationLibravatar Drew DeVault2015-11-12
This introduces a basic shared framework for making wayland clients within sway itself.