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

[Proposal] Consider Adding a Silence mode of Logging? #11

Open
awsp opened this issue May 27, 2015 · 7 comments
Open

[Proposal] Consider Adding a Silence mode of Logging? #11

awsp opened this issue May 27, 2015 · 7 comments

Comments

@awsp
Copy link

awsp commented May 27, 2015

I would like to have controls on whether or not to log messages out.
Those messages are useful when it is in development, but in production mode I would rather disable or store them into a log file or even the database itself as a collection.

What do you think?

@arvindr21
Copy link
Owner

Are you referring to connected to the db message, when the DiskDB starts?

@awsp
Copy link
Author

awsp commented May 27, 2015

Yes.

Edit: I am also thinking the possibilities of catching exceptions so I can handle errors in my code.

@arvindr21
Copy link
Owner

Sure. I can make connection message optional. But do remember this DB is not for production usage. This is a synchronous DB, where all IO operations happens in an blocking way, quite contrary to the philosophy of node.

For the exception handling, can you give an example?

Thanks.

@awsp
Copy link
Author

awsp commented May 27, 2015

Yea, I just realize it was using sync writes.
I was using this library to store trivial user data and cache in an node webkit app.

For the exception handling, nothing too fancy here, as I was thinking something like the following, instead of logging them out.

throw new Exception(e('The DB Path [' + path + '] does not seem to be valid. Recheck the path and try again'));

@arvindr21
Copy link
Owner

Makes sense. Will think of it.

Side question: Will an async version of this library help?

@awsp
Copy link
Author

awsp commented May 27, 2015

Oh yea, that should do it. Thanks!

@teawithfruit
Copy link

I think, that this could be a good solution. #42 #41

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