diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-09-24 23:22:19 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-09-24 23:26:46 +0200 |
commit | 963ddb917de3140308ee62fb642b2307a577a39e (patch) | |
tree | edfad917a0360b81c69a5030fe13b5716a687e46 /src/test/test-log.c | |
parent | 1920e37ef9fec04a1fd882f66bfa7a9a5b91c536 (diff) |
log: fix repeated invocation of vsnprintf()/vaprintf() in log_struct()
https://bugs.freedesktop.org/show_bug.cgi?id=55213
Diffstat (limited to 'src/test/test-log.c')
-rw-r--r-- | src/test/test-log.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/test-log.c b/src/test/test-log.c index cc924fa57b..8dc3d5383f 100644 --- a/src/test/test-log.c +++ b/src/test/test-log.c @@ -42,5 +42,12 @@ int main(int argc, char* argv[]) { "SERVICE=foobar", NULL); + log_struct(LOG_INFO, + "MESSAGE=Foobar PID=%lu", (unsigned long) getpid(), + "FORMAT_STR_TEST=1=%i A=%c 2=%hi 3=%li 4=%lli 1=%p foo=%s 2.5=%g 3.5=%g 4.5=%Lg", + (int) 1, 'A', (short) 2, (long int) 3, (long long int) 4, (void*) 1, "foo", (float) 2.5f, (double) 3.5, (long double) 4.5, + "SUFFIX=GOT IT", + NULL); + return 0; } |