简体   繁体   English

架构注册表日志写入 /var/messages

[英]Schema Registry logs are written to /var/messages

I'm facing a problem about GET logs of schema registry.我遇到了有关架构注册表的 GET 日志的问题。 When I check the log4j properties I see it is configured as log4j.appender.file.File=${schema-registry.log.dir}/schema-registry.log which is working as intended (log files are located under /confluent-7.0.1/logs/).当我检查 log4j 属性时,我看到它被配置为log4j.appender.file.File=${schema-registry.log.dir}/schema-registry.log它按预期工作(日志文件位于 /confluent- 7.0.1/日志/)。

My problem is there are also files under /var/log/.我的问题是 /var/log/ 下也有文件。 It seems that they are recorded in seperate files from week to week.似乎它们每周都记录在单独的文件中。

-rw-------  1 root   root      160273230 Jan  2 12:02 messages
-rw-------  1 root   root     1831024355 Dec 18 03:10 messages-20221218
-rw-------  1 root   root      706439179 Dec 25 03:07 messages-20221225
-rw-------  1 root   root     1158507310 Jan  1 03:06 messages-20230101

Content of these files are like that:这些文件的内容是这样的:

Dec 25 03:15:09 server_name bash: [2022-12-25 03:15:09,995] INFO 192.168.181.21 - kafkauser [25/Dec/2022:00:15:09 +0000] "GET /subjects/TOPIC_NAME-key/versions/latest HTTP/1.1" 200 178 "-" "-" GETsT (io.confluent.rest-utils.requests:62)
Dec 25 03:15:10 server_name bash: [2022-12-25 03:15:10,018] INFO 192.168.181.21 - kafkauser [25/Dec/2022:00:15:10 +0000] "GET /subjects/TOPIC_NAME-value/versions/latest HTTP/1.1" 200 2197 "-" "-" GETsT (io.confluent.rest-utils.requests:62)
Dec 25 03:15:10 server_name bash: [2022-12-25 03:15:10,078] INFO 192.168.181.20 - kafkauser [25/Dec/2022:00:15:10 +0000] "GET /subjects/TOPIC_NAME-key/versions/latest HTTP/1.1" 200 178 "-" "-" GETsT (io.confluent.rest-utils.requests:62)
Dec 25 03:15:10 server_name bash: [2022-12-25 03:15:10,098] INFO 192.168.181.20 - kafkauser [25/Dec/2022:00:15:10 +0000] "GET /subjects/TOPIC_NAME-value/versions/latest HTTP/1.1" 200 2197 "-" "-" GETsT (io.confluent.rest-utils.requests:62)
    

Is this logging happening because of schema registry or is it just part of the Linux system?此日志记录是由于模式注册表而发生的,还是只是 Linux 系统的一部分? I mean, is it result of.network logging or schema registry logging?我的意思是,它是网络日志记录还是架构注册表日志记录的结果? Either way, how can I make it stop or configure to be recorded at somewhere else?无论哪种方式,我怎样才能让它停止或配置为在其他地方记录? Thanks in advance.提前致谢。

I assume you have installed Confluent Platform in a way that uses systemctl ?我假设您已经以使用systemctl的方式安装了 Confluent Platform? If so, then yes, journalctl will write to /var/log/messages via the process's stdout/stderr logs.如果是这样,那么是的, journalctl将通过进程的 stdout/stderr 日志写入/var/log/messages

You need to disable the ConsoleAppender in the log4j file to stop this.您需要在 log4j 文件中禁用 ConsoleAppender 才能停止此操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM