summaryrefslogtreecommitdiffstats
path: root/sbin/hastd/primary.c
diff options
context:
space:
mode:
authortrociny <trociny@FreeBSD.org>2011-03-11 12:12:35 +0000
committertrociny <trociny@FreeBSD.org>2011-03-11 12:12:35 +0000
commita3ae0953aa712f5fbaa82f65d8c54e17fd07cea1 (patch)
treea5378f3cb0e0ca3945defcd6776a3f9da4ec75ba /sbin/hastd/primary.c
parent5d9b71c225ad0416f9d004fd487db33af1d243ac (diff)
downloadFreeBSD-src-a3ae0953aa712f5fbaa82f65d8c54e17fd07cea1.zip
FreeBSD-src-a3ae0953aa712f5fbaa82f65d8c54e17fd07cea1.tar.gz
Make workers inherit debug level from the main process.
Approved by: pjd (mentor) MFC after: 1 week
Diffstat (limited to 'sbin/hastd/primary.c')
-rw-r--r--sbin/hastd/primary.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/hastd/primary.c b/sbin/hastd/primary.c
index 8a2065b..6246c71 100644
--- a/sbin/hastd/primary.c
+++ b/sbin/hastd/primary.c
@@ -806,7 +806,7 @@ hastd_primary(struct hast_resource *res)
{
pthread_t td;
pid_t pid;
- int error, mode;
+ int error, mode, debuglevel;
/*
* Create communication channel for sending control commands from
@@ -858,6 +858,7 @@ hastd_primary(struct hast_resource *res)
gres = res;
mode = pjdlog_mode_get();
+ debuglevel = pjdlog_debug_get();
/* Declare that we are sender. */
proto_send(res->hr_event, NULL, 0);
@@ -869,6 +870,7 @@ hastd_primary(struct hast_resource *res)
descriptors_assert(res, mode);
pjdlog_init(mode);
+ pjdlog_debug_set(debuglevel);
pjdlog_prefix_set("[%s] (%s) ", res->hr_name, role2str(res->hr_role));
setproctitle("%s (primary)", res->hr_name);
OpenPOWER on IntegriCloud