-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: add request logging While working with KSQL server logs I noticed that the logs output by rest-utils is not of much use: ``` [2019-10-03 09:22:06,518] INFO 10.16.50.25 - - [03/Oct/2019:07:22:05 +0000] "POST /ksql HTTP/1.1" 200 16820 1298 (io.confluent.rest-utils.requests:60) ``` All it tells us is the time of the request, the status code and the size of the payload. What it does not tell us is what was in the request. This would be useful when debugging! With this change we get logs like: ``` [2019-10-09 22:34:06,193] INFO Received: KsqlRequest{ksql='CREATE STREAM TEST (ID INT) WITH (kafka_topic='test_topic', value_format='JSON');INSERT INTO TEST (ROWTIME, ROWKEY, ID) VALUES (1234, 'key', 10);', streamsProperties={}, commandSequenceNumber=Optional.empty} (io.confluent.ksql.rest.server.resources.KsqlResource:198) ``` Which tells us not only what command was run, but also with what local property overrides. Useful stuff! * chore: add log4j help * Update config/log4j.properties Co-Authored-By: Victoria Xia <[email protected]>
- Loading branch information
1 parent
a59954d
commit c401ec0
Showing
4 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@big-andy-coates Rebased again and noticed that this also logs pull queries coming in. So it will end up flooding the log for every lookup. thoughts?