Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trackrdrd
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
trackrdrd
Commits
b2ba627a
Commit
b2ba627a
authored
Jun 03, 2014
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MQ plugin for Kafka: rdkafka config param log_level sets the log level for
the messaging plugin as well
parent
49a546c0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
15 deletions
+16
-15
README.rst
trackrdrd/src/mq/kafka/README.rst
+6
-2
config.c
trackrdrd/src/mq/kafka/config.c
+9
-12
kafka.conf
trackrdrd/src/mq/kafka/test/kafka.conf
+1
-1
No files found.
trackrdrd/src/mq/kafka/README.rst
View file @
b2ba627a
...
...
@@ -168,8 +168,6 @@ Parameter Description
``topic`` Name of the Kafka topic to which messages
are sent (required)
----------------------------------- --------------------------------------------
``mq.debug`` If set to true, then log at DEBUG level
----------------------------------- --------------------------------------------
``worker.shutdown.timeout.ms`` If non-zero, workers will wait this long
before they shut down for acknowledgements
that all of the messages that they produced
...
...
@@ -186,6 +184,12 @@ the ``rdkafka`` client, as documented at::
https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md
The ``rdkafka`` parameter ``log_level`` sets the log level for both
the ``rdkafka`` client and the messaging plugin. Note that the value
of this parameter is a numeric syslog(3) "serverity level" (cf. RFC
5424 section 6.2.1, table 2), so INFO level is 6 (the default) and
DEBUG level is 7.
The following ``rdkafka`` parameters in the config file are ignored
(they are set internally by the messaging plugin, or are only relevant
to consumers):
...
...
trackrdrd/src/mq/kafka/config.c
View file @
b2ba627a
...
...
@@ -122,17 +122,15 @@ CONF_Add(const char *lval, const char *rval)
return
EINVAL
;
return
(
0
);
}
/* XXX: use the rdkakfka param "log_level" instead */
if
(
strcmp
(
lval
,
"mq.debug"
)
==
0
)
{
if
(
strcmp
(
rval
,
"1"
)
==
0
||
strcasecmp
(
rval
,
"true"
)
==
0
||
strcasecmp
(
rval
,
"yes"
)
==
0
||
strcasecmp
(
rval
,
"on"
)
==
0
)
loglvl
=
LOG_DEBUG
;
else
if
(
strcmp
(
rval
,
"0"
)
!=
0
&&
strcasecmp
(
rval
,
"false"
)
!=
0
&&
strcasecmp
(
rval
,
"no"
)
!=
0
&&
strcasecmp
(
rval
,
"off"
)
!=
0
)
if
(
strcmp
(
lval
,
"log_level"
)
==
0
)
{
unsigned
l
;
if
((
err
=
conf_getUnsignedInt
(
rval
,
&
l
))
!=
0
)
return
(
err
);
if
(
loglvl
>
LOG_DEBUG
)
return
EINVAL
;
loglvl
=
l
;
result
=
rd_kafka_conf_set
(
conf
,
lval
,
rval
,
errstr
,
LINE_MAX
);
if
(
result
!=
RD_KAFKA_CONF_OK
)
return
EINVAL
;
return
(
0
);
}
...
...
@@ -156,5 +154,4 @@ CONF_Dump(void)
MQ_LOG_Log
(
LOG_DEBUG
,
"topic = %s"
,
topic
);
MQ_LOG_Log
(
LOG_DEBUG
,
"worker.shutdown.timeout.ms = %u"
,
wrk_shutdown_timeout
);
// leaving out mq.debug for now
}
trackrdrd/src/mq/kafka/test/kafka.conf
View file @
b2ba627a
...
...
@@ -4,5 +4,5 @@ zookeeper.connect = localhost:2181
zookeeper
.
connection
.
timeout
.
ms
=
10000
zookeeper
.
log
=
zoo
.
log
topic
=
libtrackrdr_kafka_test
mq
.
debug
=
true
log_level
=
7
debug
=
all
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment