aboutsummaryrefslogtreecommitdiff
path: root/include/log.h
AgeCommit message (Collapse)Author
2019-07-15Use -fmacro-prefix-map to strip build pathManuel Stoeckl
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.
2019-01-21Replace wlr_log with sway_logM Stoeckl
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.
2018-09-06Remove __PRETTY_FUNCTION__Scott Anderson
This is a non-standard extension as well as completely useless in C. __func__ is the standard way of doing this.
2018-07-09Update for swaywm/wlroots#1126emersion
2018-02-24update log.h for latest wlrTony Crisci
2018-01-05common/log: finish removing most log functionsDominique Martinet
Keep sway_abort and sway_assert and convert them to use wlr_log functions
2018-01-05sway: change all sway_log to wlr_logDominique Martinet
2017-04-20Make sway_abort() report locationJerzi Kaminsky
2017-04-16Fix location reported by sway_assertJerzi Kaminsky
2017-04-16Fix variadic forwarding in sway_assertJerzi Kaminsky
_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
2016-12-15Always log filename and line numberDrew DeVault
2016-06-27Add get_log_level() to encapsulate v (current log level)David Eklov
This patch also makes all global variable in log.c static.
2016-05-02common: refactor sway_log()Eric Engestrom
This removes most preprocessor logic, leaving it only it the header.
2015-11-28Rearrange logging headersDrew DeVault
Ref #270
2015-11-11Add file and line number to log in Debug buildDrew DeVault
2015-10-27commands: Learn 'debuglog'.S. Christoffer Eliesen
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).
2015-10-25log: Add swayc_log, use at a few key places.S. Christoffer Eliesen
swayc_log works just like sway_log, but appends type and name from given container to the log output.
2015-08-26move_container_to fixuptaiyu
2015-08-24Added in backtrace printingLuminarys
2015-08-21fixed #108 signed/unsigned comparisonminus
2015-08-20properly handle IPC clientsminus
2015-08-19fixed some more bugs, moved layout_log into log.ch, restored focus_parenttaiyu
2015-08-18added sway_assert functionminus
returns false on a failed assertion in release mode and raises SIGABRT in debug mode
2015-08-16handle_view_state_requesttaiyu
2015-08-16Move headers to include/Drew DeVault