mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-22 21:11:04 +01:00
When creating connection on behalf of primary worker, set pjdlog prefix
to resource name and role, so that any logs related to that can be identified properly. MFC after: 1 week
This commit is contained in:
parent
c3a8627c9a
commit
4f0ec4797a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=219814
@ -842,6 +842,8 @@ connection_migrate(struct hast_resource *res)
|
||||
struct proto_conn *conn;
|
||||
int16_t val = 0;
|
||||
|
||||
pjdlog_prefix_set("[%s] (%s) ", res->hr_name, role2str(res->hr_role));
|
||||
|
||||
if (proto_recv(res->hr_conn, &val, sizeof(val)) < 0) {
|
||||
pjdlog_errno(LOG_WARNING,
|
||||
"Unable to receive connection command");
|
||||
@ -869,6 +871,8 @@ out:
|
||||
}
|
||||
if (val == 0 && proto_connection_send(res->hr_conn, conn) < 0)
|
||||
pjdlog_errno(LOG_WARNING, "Unable to send connection");
|
||||
|
||||
pjdlog_prefix_set("%s", "");
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user