Commit Graph

24 Commits

Author SHA1 Message Date
Angus Salkeld
30a7871646 LOG: fix the format comparison to avoid generating multiple entries.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-11-29 17:31:05 +11:00
Angus Salkeld
6e130725e4 LOG: make the format comparison safe and sane
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-10-23 10:35:05 +11:00
Angus Salkeld
435d1dbce2 LOG: use the array callback to register new callsites
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-10-23 10:33:00 +11:00
Angus Salkeld
35a4421d23 cleanup some warnings
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-31 22:18:04 +10:00
Angus Salkeld
d6883981e3 Fix some leaks in the logging.
Mainly for valgrind purposes.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-27 16:42:38 +11:00
Angus Salkeld
9294ebfa57 LOG: Now the array is self locking we can make the lookup array dynamic
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-09 12:34:50 +11:00
Angus Salkeld
430c038d36 LOG: make the log arrays manually grow-able since we need to lock the calls.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-07 12:48:43 +11:00
Angus Salkeld
0d21be245b ARRAY: save memory (in the bins array) and allow holes in the array
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-22 17:30:19 +11:00
Angus Salkeld
27d2b0a882 LOG: make sure qb_log_from_external_source() takes priority into account.
Fixes: https://github.com/asalkeld/libqb/issues/28

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-01-24 23:08:39 +11:00
Angus Salkeld
2947797897 LOG: make sure the format is checked.
In case of log clashes (same file/lineno but in different directories.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-01-17 21:37:32 +11:00
Angus Salkeld
46098d1cbe LOG: make it possible to pass in a NULL filename/function into qb_log_from_external_source()
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-01-06 10:39:10 +11:00
Angus Salkeld
5d8c96314e Allow the array to automatically grow.
this makes it a bit friendlier to use, as
the user will not have to call qb_array_grow().

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-01-04 21:40:03 +11:00
Angus Salkeld
ab3dc60f7f Merge some portability changes from the mingw branch
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-12-21 14:23:43 +11:00
Andrew Beekhof
61d166abbc Support compilation on Mac OSX
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-12-19 22:16:30 +11:00
Angus Salkeld
fdf418abf5 LOG: clean up mem better when qb_log_fini is called
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-11-10 21:28:14 +11:00
miz-take
fcd96fc8e0 Improve the error handling esp. after failed malloc's
Reviewed-by: Angus Salkeld <asalkeld@redhat.com>
2011-11-08 09:50:38 +11:00
Angus Salkeld
98493d9ae8 Change Lindent options to break the procedure type.
so change:
int foo(void)

to

int
foo(void)

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-22 14:19:14 +10:00
Angus Salkeld
943b1c646b fix the FIXME's Jim pointed out
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-18 11:11:14 +10:00
Angus Salkeld
06642a4227 LOG: add locking & change dcs list into a singly-linked list.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-18 22:57:23 +10:00
Angus Salkeld
2561b8fb96 LOG: created array with wrong size - yikes!
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-18 22:54:13 +10:00
Angus Salkeld
6f73dd2993 LOG: make all priorities uint8_t
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-18 22:54:13 +10:00
Angus Salkeld
d8b1c2564c Compile on FreeBSD
Also re-run autoscan.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-15 14:01:36 +10:00
Angus Salkeld
c92feeb694 LOG: fix new callsite pointer (not incrementing correctly)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-14 22:22:22 +10:00
Angus Salkeld
b7e83fd3b2 LOG: add dynamic callsites (for platforms that don't support __attribute__(section)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-14 16:05:38 +10:00