summaryrefslogtreecommitdiff
path: root/include/log.h
AgeCommit message (Collapse)AuthorLines
2019-07-15Use -fmacro-prefix-map to strip build pathManuel Stoeckl-6/+10
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-6/+38
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-1/+1
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-2/+8
2018-02-24update log.h for latest wlrTony Crisci-2/+2
2018-01-05common/log: finish removing most log functionsDominique Martinet-4/+4
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-24/+1
2017-04-20Make sway_abort() report locationJerzi Kaminsky-1/+4
2017-04-16Fix location reported by sway_assertJerzi Kaminsky-2/+2
2017-04-16Fix variadic forwarding in sway_assertJerzi Kaminsky-0/+3
_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-5/+0
2016-06-27Add get_log_level() to encapsulate v (current log level)David Eklov-0/+1
This patch also makes all global variable in log.c static.
2016-05-02common: refactor sway_log()Eric Engestrom-3/+3
This removes most preprocessor logic, leaving it only it the header.
2015-11-28Rearrange logging headersDrew DeVault-4/+0
Ref #270
2015-11-11Add file and line number to log in Debug buildDrew DeVault-1/+10
2015-10-27commands: Learn 'debuglog'.S. Christoffer Eliesen-0/+4
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-0/+2
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-1/+5
2015-08-24Added in backtrace printingLuminarys-0/+1
2015-08-21fixed #108 signed/unsigned comparisonminus-3/+3
2015-08-20properly handle IPC clientsminus-0/+1
2015-08-19fixed some more bugs, moved layout_log into log.ch, restored focus_parenttaiyu-0/+2
2015-08-18added sway_assert functionminus-2/+4
returns false on a failed assertion in release mode and raises SIGABRT in debug mode
2015-08-16handle_view_state_requesttaiyu-2/+2
2015-08-16Move headers to include/Drew DeVault-0/+16