Skip to content

Implement logging over kafka - #147

Open
mlinvill wants to merge 3 commits into
mainfrom
mlinvill_feature_kafka-logging
Open

Implement logging over kafka#147
mlinvill wants to merge 3 commits into
mainfrom
mlinvill_feature_kafka-logging

Conversation

@mlinvill

Copy link
Copy Markdown
Contributor

This PR implements a Kafka log handler in the existing logging implementation using the Python standard logging library.

With this change, logs will be sent to SNEWPLOG_TOPIC, currently defined as kafka://${HOP_BROKER}/snews.operations, in addition to the snews_cs.log file. This feature is the first step in enabling the writing of log messages to the database via SNEWS_DB_PIPELINE. Log messages can then be shared more widely via the SNEWS_Monitoring_Website interface.

Also, the location of the snews_cs.log file can now be overridden using a SNEWSLOG_DIR environment variable.

Open questions: Do we need to control who can see specific log messages? Or are there concerns surrounding sharing log information more widely.

@habig

habig commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

We should add a switch that disables this by default, so that testing copies of snews_cs don't all spam the ops topic. It could be on for the "real" server.

What do to about multiple "real" servers? We'll cross that bridge when we come to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants