-
Notifications
You must be signed in to change notification settings - Fork 127
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
Improved logging #3001
base: master
Are you sure you want to change the base?
Improved logging #3001
Conversation
Yeah, this is arguably a
is because elif value is SomeInteger: # this case gets skipped
w.stream.writeText value
elif value is SomeFloat:
# TODO Implement writeText for floats
# to avoid the allocation here:
append $value
elif value is (seq or array or openArray) or
(value is distinct and distinctBase(value) is (seq or array or openArray)):
when value is distinct:
w.writeArray(distinctBase value)
else:
w.writeArray(value)
elif value is (distinct or object or tuple):
mixin flavorUsesAutomaticObjectSerialization
type Flavor = JsonWriter.Flavor
const isAutomatic =
flavorUsesAutomaticObjectSerialization(Flavor)
when not isAutomatic:
const typeName = typetraits.name(type value)
{.error: "Please override writeValue for the " & typeName & " type (or import the module where the override is provided)".}
when value is distinct:
# it tries to do this, but this is inappropriate for a `distinct SomeInteger`
writeRecordValue(w, distinctBase(value, recursive = false)) This only trigers when But when automatic serialization is enabled, this at least some kind of n-j-s issue. |
Initially, I also agreed that it was a Nim-Json-Serializer bug. After some talks, I've changed my mind. |
Yeah, the bug I had in mind was mainly that it even tried to use the It's fine to group |
- log file support removal - auto detection of tty, colour support and related.
for some eth, web3 and confutils types
ae7cb52
to
1ab736e
Compare
Improved eth1 logging:
fix #2544