Alexander Berntsen
f9d93d75b3
Implement shmlog command
...
Add shmlog command that takes <size>|toggle|on|off. Separate logbuffer
management into open_logbuffer() and close_logbuffer(). Make
t/187-commands-parser.t expect 'shmlog'. Add update_shmlog_atom() to
update the SHMLOG_PATH. Document the shmlog command in userguide.
2013-06-23 21:48:02 +02:00
Michael Stapelberg
d638e3029a
don’t use reversed identifiers for include guards (Thanks Markus)
...
Done with:
sed -in 's/\(ifndef\|define\) _\([0-9A-Z_]*\)$/\1 I3_\2/' include/**/*.h
fixes #804
2012-09-21 15:36:25 +02:00
Quentin Glidic
9f7247fd9c
libi3: Introduce LOG
2012-08-13 11:39:30 +02:00
Quentin Glidic
bc5f33878a
i3/log.h: Prepare for libi3.h inclusion
2012-08-13 11:30:08 +02:00
Michael Stapelberg
884627ef20
use I3__FILE__ for DLOG, leave __FILE__ as is
...
See also commit 0e752070ac
, which broke
source code listings in gdb unless you cd into i3/src. This should give
us best of both :-).
2012-08-12 12:19:47 +02:00
Julius Plenz
70ec3867fe
clean up zero-byte logfile on immediate exit
...
Otherwise, a zero-byte log file stays behind after every call to `i3
--get-socketpath`. Also, replace "return" calls with more explicit "exit"
calls.
Before:
$ ls -ld /tmp/i3* | wc -l; \
repeat 10 i3 --get-socketpath >/dev/null; \
ls -ld /tmp/i3* | wc -l
1
11
Now:
$ ls -ld /tmp/i3* | wc -l; \
repeat 10 i3 --get-socketpath >/dev/null; \
ls -ld /tmp/i3* | wc -l
1
1
Signed-off-by: Julius Plenz <julius@plenz.com>
2012-08-11 02:23:03 +02:00
Michael Stapelberg
cab8e3c46f
log.h: include left-over slog() prototype
2012-08-05 15:59:45 +02:00
Michael Stapelberg
991a9de0d7
log.h: tell the compiler these logging functions use printf-like formats
...
This gives us additional warnings and is supported in gcc and clang.
2012-08-05 15:59:08 +02:00
Quentin Glidic
bdc078914b
i3: Replace loglevels by a global debug logging
...
File-limited were not used nor really useful
Besides, they are painful to maintain in Makefile rules compared to the
benefit
2012-07-22 18:41:12 +02:00
Michael Stapelberg
206b96202c
Use (void) instead of () for functions without args (Thanks fernandotcl)
...
See also:
http://article.gmane.org/gmane.linux.kernel/1268792
The C compiler will handle (void) as "no arguments" and () as "variadic
function" (equivalent to (...)) which might lead to subtle errors, such
as the one which was fixed with commit 0ea64ae4
.
2012-03-31 10:53:04 +02:00
Michael Stapelberg
dee7c07ad2
shmlog: store meta information in the buffer itself, store path as X11 atom
...
This makes i3-dump-log completely independent of a running i3 instance.
2012-01-06 23:40:07 +00:00
Michael Stapelberg
e65ee63763
Implement logging to a SHM ringbuffer
...
This feature is automatically enabled when running a debug version of i3.
The logfile will use 1% of your physical RAM size, but at max 25 MiB.
2011-12-10 10:50:33 +00:00
Michael Stapelberg
726f2a1e5a
normalize file headers across **/*.{h,c}
2011-10-25 21:19:38 +01:00
Michael Stapelberg
c55abca115
add i3-nagbar. tells you about config file errors (for example)
2011-07-10 14:33:19 +02:00
Michael Stapelberg
7f3a77ac6a
loglevel bitmasks needs to be larger because we got more than 32 files
2010-04-17 17:46:11 +02:00
Michael Stapelberg
af00df9321
Use DLOG for debug messages instead of printf (Thanks kruM)
2010-03-19 18:48:36 +01:00
Michael Stapelberg
4226cc61de
add log.c/log.h which contain all the log related macros and functions
2009-12-19 22:40:23 +01:00