Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could you please tell me the general logic of how logstash-async processes logs? #106

Open
klin111 opened this issue Feb 21, 2025 · 3 comments

Comments

@klin111
Copy link

klin111 commented Feb 21, 2025

Are logs first written into a db file and then sent to Logstash?
If so, is the logging to the db file done asynchronously?
Can the database-path be omitted, i.e., not specified in the configuration file?
I've noticed that omitting it leads to an error indicating that the database-path must be provided.
thanks
@bngsudheer @skwashd @rmihael @sarg @eht16

@skwashd
Copy link
Contributor

skwashd commented Feb 22, 2025

@klin111 I'm not sure why you tagged on this issue.

I contributed a small patch about a decade ago to support TLS connections. I only dug into the internals enough to add the feature I needed. I haven't used this library for many year.

I'm unsubscribing myself from this issue, so I won't see any more followups.

@eht16
Copy link
Owner

eht16 commented Feb 22, 2025

@klin111

I will answer your questions only in short because the questions are already answered in detail in the documentation. In particular I recommend to read https://python-logstash-async.readthedocs.io/en/stable/about.html and https://python-logstash-async.readthedocs.io/en/stable/persistence.html.

Are logs first written into a db file and then sent to Logstash? If so, is the logging to the db file done asynchronously?

Yes and yes.

Can the database-path be omitted, i.e., not specified in the configuration file?

Simply set it to None to use an in-memory cache.

I've noticed that omitting it leads to an error indicating that the database-path must be provided.

What exactly did you, can you share your configuration?

@klin111
Copy link
Author

klin111 commented Feb 24, 2025

@eht16

Thank you for sharing. I had configured it as: database_path="" or database_path=":memory:". However, later when I set it to: database_path="None", the error disappeared.

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

No branches or pull requests

3 participants