mirror of
https://salsa.debian.org/ha-team/libqb
synced 2026-08-12 13:04:57 +00:00
LOG: add %P (pid) as a format option.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
parent
b711f73ce7
commit
7eaa3dc09a
@ -478,6 +478,7 @@ void qb_log_tags_stringify_fn_set(qb_log_tags_stringify_fn fn);
|
||||
* %b BUFFER
|
||||
* %g TAGS
|
||||
* %N name (passed into qb_log_init)
|
||||
* %P PID
|
||||
*
|
||||
* any number between % and character specify field length to pad or chop
|
||||
*/
|
||||
|
||||
@ -253,6 +253,11 @@ qb_log_target_format(int32_t target,
|
||||
}
|
||||
break;
|
||||
|
||||
case 'P':
|
||||
snprintf(line_no, 30, "%d", getpid());
|
||||
p = line_no;
|
||||
break;
|
||||
|
||||
default:
|
||||
p = "";
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user