Closed booo closed 12 years ago
Yes, I think it's reasonable. Probably need to do the same with C code when DEBUG isn't defined. OTOH, https://github.com/alexeyr/erlang-sqlite3/blob/master/src/sqlite3.erl#L976 probably needs to stay since you can't normally get results from terminate
.
Would be really great if you could change the code. I'm not sure about the gen_server:terminate but I think this is rare error and logging is ok in this situation. Maybe the best solution for erlang and c code is to have a DEBUG flag?
While DEBUG as a macro makes sense for C code, I don't like it for
Erlang. It could be an option passed to open
, I guess... Probably no
need, better just to remove it everywhere except when
loading/unloading the driver. Could you add the pull request?
Yours, Alexey Romanov
On Wed, Jun 13, 2012 at 10:33 PM, Ⓐ reply@reply.github.com wrote:
Would be really great if you could change the code. I'm not sure about the gen_server:terminate but I think this is rare error and logging is ok in this situation. Maybe the best solution for erlang and c code is to have a DEBUG flag?
Reply to this email directly or view it on GitHub: https://github.com/alexeyr/erlang-sqlite3/issues/10#issuecomment-6309415
Done. Also changed C code to log only when DEBUG is defined.
Thanks a lot!
I'm currently working with your library and I'm having some problems with the way you log/report errors. The actual line that annoys me a bit is https://github.com/alexeyr/erlang-sqlite3/blob/master/src/sqlite3.erl#L1038
I do not want the library to log errors for me. The library should return error tuples and I can handle the logging in my application code if I want to. Do you think we can change code? I can add a pull request to this ticket if you like. If there is another way to disable the logging please let me know!
Thanks for maintaining the library! Seems to be nice really nice so far.
Best Regards Philipp