-
Notifications
You must be signed in to change notification settings - Fork 94
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
Formatting of []byte
in Query.logSQL()
#61
Comments
Go for it! |
@kPshi Any opinion on serialization format? I'm using hex since that's how my query tool displays binary fields. Base64 would be more compact though. |
As you seem to be ambitious: how about extracting the logSQL function into an own field (maybe named SQLFormatFunc) of the Query struct? Personally I'd prefer hex as default format, though, as that makes bytes more readable (you see e.g. a zero terminated field within binary data easily). That might be left to individual formatting functions, of course. |
If you're going to extract the func as a field, I'd suggest to set the default to your new format and also prepare a copy of the legacy function if anyone depends on that (what I do not expect, but "should" is none of my favourite words in IT. ;-) ) |
Does @qiangxue have an opinion on this? |
I'm not sure what the ins and outs are for everyone here, but a problem I'm encountering with SQL logging in ozzo is that it logs byte slices as raw bytes. For certain values, this will corrupt the terminal when I
cat
the log files. By changing line 87 fromto
my logs are far less troublesome.
Any opinions on making this change to ozzo?
The text was updated successfully, but these errors were encountered: