-
Notifications
You must be signed in to change notification settings - Fork 53
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
scanning caught an error: bufio.Scanner: token too long #53
Comments
@patroza do you mind me asking how long is the string you're dealing with? If you have a reproducer case that'd be awesome! |
@aybabtme the JSON payload itself was I noticed that the latest versions have truncation enabled by default, This was super confusing as a co-worker installed it on linux via atm as workaround I use if which humanlog >/dev/null; then
# For some reason --skip-unchanged is enabled by default and can't figure out how to disable!
# https://github.com/humanlogio/humanlog/issues/40
tee dev.log | (humanlog --keep requestId --keep requestName --truncate-length 16384 || (echo 'humanlog crashed!' && cat))
else
echo "!! It's recommended to install humanlog, to make these logs more readable. !!"
# while read x ; do echo $x ; done
tee dev.log
fi |
@patroza which tap did you use for installing You can find that out by running:
The output should look like:
If you're seeing First, I think simply updating brew, adding the new tap and then reinstalling
If this still installs from the wrong tap, or if it shows an error message, remove the old tap manually:
At this time the latest version of humanlog should print:
|
Hi,
I have a long json payload in logfmt value, and I run into token too long.
Could you please increase the buffer, make it configurable, and perhaps at least catch the particular error and instead of crashing, mark the field as error and continue?
I found some background on the error: https://stackoverflow.com/a/37455465
The text was updated successfully, but these errors were encountered: