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

how to connect serverless instance in mongodb.net #53

Open
nabeenb opened this issue Aug 11, 2023 · 5 comments
Open

how to connect serverless instance in mongodb.net #53

nabeenb opened this issue Aug 11, 2023 · 5 comments

Comments

@nabeenb
Copy link

nabeenb commented Aug 11, 2023

I am trying to connect via BufferedMongoHandler to remote hosted serverless instance in mongodb.net.
Do you have any sample or example.

@oz123
Copy link
Collaborator

oz123 commented Aug 12, 2023

Unfortunately, no. How are you connecting to it via other tools?

@nabeenb
Copy link
Author

nabeenb commented Aug 16, 2023

Ok, I am able to connect via URI. Now error is log4mongo/handlers.py", line 300, in flush_to_mongo
self.handleError(self.last_record) #handling the error on flush

@oz123
Copy link
Collaborator

oz123 commented Aug 16, 2023

Please post the complete stack trace.

@nabeenb
Copy link
Author

nabeenb commented Sep 15, 2023

BufferedMongoHandler(host=uri,
#username='',
#password='',
database_name='mydb',
collection='logs',
authentication_db='mydb',
capped=True,
buffer_size=1000, # buffer size.
buffer_periodical_flush_timing=60.0, # periodical flush every 60 seconds
buffer_early_flush_level=logging.CRITICAL)

able to login. is there way to use two different collections for two set of logs.

@oz123
Copy link
Collaborator

oz123 commented Sep 15, 2023

You can define to handlers.
Each one should write to a collection.

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

2 participants