Use raw sql to write logs to db.

This is to make the db logging a bit faster, here are the results on my machine to write 1000 entries to the db.

Before: 12seconds
After: 8 Seconds

this code skips Marr completely and writes to DB using plain sql commands and connection