Date: Mon, 21 Mar 2011 08:33:58 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r219814 - head/sbin/hastd Message-ID: <201103210833.p2L8Xw6w004802@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pjd Date: Mon Mar 21 08:33:58 2011 New Revision: 219814 URL: http://svn.freebsd.org/changeset/base/219814 Log: 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 Modified: head/sbin/hastd/hastd.c Modified: head/sbin/hastd/hastd.c ============================================================================== --- head/sbin/hastd/hastd.c Mon Mar 21 08:31:35 2011 (r219813) +++ head/sbin/hastd/hastd.c Mon Mar 21 08:33:58 2011 (r219814) @@ -842,6 +842,8 @@ connection_migrate(struct hast_resource 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103210833.p2L8Xw6w004802>