Conversation
adrrf
requested changes
Nov 17, 2024
Contributor
adrrf
left a comment
There was a problem hiding this comment.
the code seems in order, but it would be nice to have kafka and the service dockerized for testing in my local machine
Closed
2 tasks
Contributor
Author
The logger is a separate service with its own kafka deployed. This service does not need an instace of kafka |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new logging system with Kafka integration and updates to the configuration and main application logic to support it. The most important changes include adding dependencies, updating the configuration file, creating a new logger module, and modifying the main application logic to utilize the new logger.
New Logging System:
Dependencies Added:
kafka,serde_json,chrono, anduuidtoCargo.toml.Configuration Updates:
config.yamlto include logger configuration options such asuse_kafka,kafka_host,kafka_topic, and log file paths.LoggerConfigstruct tosrc/config/parser.rsto parse the new logger configuration options.Logger Module:
loggermodule insrc/config/logger.rswith methods for logging messages to files and Kafka.src/config/mod.rsto include the newloggermodule.Main Application Logic:
Main Function Updates:
src/main.rsto initialize the logger from the configuration and pass it to the request handler. [1] [2] [3]Request Handling:
handle_requestfunction insrc/main.rsto log incoming connections, path not found errors, authorization failures, and downstream service connection issues using the new logger.