Angus Salkeld
7b847a3b19
LOG: add a test for a padded hex int.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-01-04 15:56:59 +11:00
Angus Salkeld
e07eccd6a6
Fix the blackbox formatter when specifing the string len/precision
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-12-19 10:51:54 +11:00
The Quarterback Library Release Team
d54e8b1e8c
Fix "make distcheck"
...
Signed-off-by: The Quarterback Library Release Team <quarterback-devel@fedorahosted.org>
2012-09-10 11:09:28 +10:00
Andrew Beekhof
951c9826f8
TEST: Include writing and reading the blackbox in the log_long_msg test
2012-09-05 19:34:56 +10:00
Angus Salkeld
a55554efb1
LOG: change qb_vsprintf_serialize() into qb_vsnprintf_serialize()
...
This is to prevent overwriting the ringbuffer.
Also remove stpcpy() as it is not used anymore.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-08-29 21:40:40 +10:00
Angus Salkeld
b9f8ec34df
LOG: fix threaded logging.
...
This has been broken for a year - yikes!
Thanks to Voznesensky Vladimir for spotting it.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-14 11:01:52 +10:00
Angus Salkeld
9956fe29ff
LOG: fix the printing of %p in the blackbox
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-04 14:54:39 +10:00
Angus Salkeld
a4beed9bbf
TEST: make the test_priority the same type as in the callsite
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-07 13:06:44 +11:00
Angus Salkeld
623a32d81f
TEST: properly clear the filters
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-05 17:07:28 +11:00
Angus Salkeld
504e000cb8
LOG: add a hostname %H format specifier.
...
This is useful when logging to file on a cluster.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-15 17:34:45 +11:00
Angus Salkeld
ff0d89721f
LOG: Add qb_log_filter_fn_set()
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-15 15:40:58 +11:00
Angus Salkeld
42d20b5090
Get coverity to ignore this warning.
...
"Using uninitialized element of array"
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-03 14:42:25 +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
f6c5c5179d
Deprecate qb_util_set_log_function()
...
And remove uses of it from the test programs
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-01-24 16:00:05 +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
ec751144f7
TEST: make sure qb_log() can be called before init.
...
The log is dropped but it won't crash.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-01-17 14:35:21 +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
7f09ba15d5
TEST: add a simple test for right-aligned text in format strings
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-10-18 10:13:00 +11:00
Angus Salkeld
5944229b60
LOG: allow large priorities
...
They will be printed as trace, it's mainly to make
filtering more flexible
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-09 16:20:54 +10:00
Angus Salkeld
f5fcf2a30b
LOG: add a way of getting the target state
...
This is so we can do the following:
for (t = 0; t < QB_LOG_TARGET_MAX; t++) {
if (qb_log_ctl(t, QB_LOG_CONF_STATE_GET, 0) == QB_LOG_STATE_ENABLED) {
// bla bla
}
}
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-08 16:40:02 +10:00
Angus Salkeld
be8248bd50
LOG: support comma seperated lists of file and function filters
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-08 13:24:18 +10:00
Angus Salkeld
1591075873
LOG: serialize the va_list, don't snprintf
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-22 10:29:48 +10:00
Angus Salkeld
f4e2705e95
LOG: use strerror_r instead of strerror in qb_perror()
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-27 15:57:51 +10:00
Angus Salkeld
dc278798a3
TEST: bump up the logging timeout
...
This was failing on sparcv9, but seems to just be a slow machine.
With a bigger timeout it passes.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-27 09:34:07 +10:00
Angus Salkeld
048edde19c
LOG: add custom targets
...
This is partly to make the tests more robusts and
to add some more flexibility to the logging.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-23 20:28:18 +10:00
Angus Salkeld
2a83aa8dfe
LOG: add an enter and leave trace function
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-06 10:54:20 +10:00
Angus Salkeld
a050b13414
TESTS: add a threaded logging test
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-18 22:55:26 +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
c2f72d4068
LOG: add some basic tests & fixes
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-14 16:05:46 +10:00