Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

There is a bug in line 101 of file loghandler/app.py #84

Closed
ylxblye opened this issue Aug 5, 2022 · 0 comments
Closed

There is a bug in line 101 of file loghandler/app.py #84

ylxblye opened this issue Aug 5, 2022 · 0 comments

Comments

@ylxblye
Copy link

ylxblye commented Aug 5, 2022

In the dict self.moudles, all keys are lowercase,eg:

  • self.modules["stdout"] (key is "stdout")
  • self.modules["elasticsearch"] (key is "elasticsearch")
    but at line 101 of file loghandler/app.py, the value of output["type"] maybe "STDOUT", "ElasticSearch"。Therefore, the logic underblow is wrong:
    output = [
    output for output in self.config["outputs"] if output["type"] == key
    ][0]

The correct logic should be:
output = [
output for output in self.config["outputs"] if output["type"].lower() == key
][0]

math280h added a commit that referenced this issue Nov 27, 2022
@math280h math280h closed this as completed May 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants