Skip to content
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

Show duplicates after too long characters? #183

Open
yangmeishu opened this issue Feb 11, 2022 · 4 comments
Open

Show duplicates after too long characters? #183

yangmeishu opened this issue Feb 11, 2022 · 4 comments
Labels

Comments

@yangmeishu
Copy link

example.log

start---------------"247681439263358976", "248356254055923712", "248401934187233280", "248759950841479168", "249374281987784704", "249375299593043968", "249378097495801856", "249379617947779072", "249382036958085120", "249383126118170624", "249384597480013824", "249386854879592448", "249387761264492544", "249421056253624320", "249423190240002048", "249423190416162816", "249423190495854592", "249423190575546368", "249423190692986880", "249423190797844480", "249423190911090688", "249423190982393856", "249423191066279936", "249423191137583104", "249423191250829312", "249423191322132480", "249423191418601472", "249423191573790720", "249441190292750336", "249441190431162368", "249441190552797184", "249441190657654784", "249441190749929472", "249441190850592768", "249441190963838976", "249441191089668096", "249441191219691520", "249441191324549120", "249441191412629504", "249441191534264320", "249448263122419712", "249448263248248832", "249448263290191872", "249448263336329216", "249448263382466560", "249448263420215296", "249448263478935552", "249448263529267200", "249448263575404544", "249448263621541888", "249448263663484928", "249448263713816576", "249448263764148224", "249448263814479872", "249448264099692544", "249448264162607104", "249448264217133056", "249448264288436224", "249448264355545088", "249448264607203328", "249448264670117888", "249448264728838144", "249448264770781184", "249448264812724224", "249448264867250176", "249448264909193216", "249448264967913472", "249448265014050816", "249448265064382464", "249448265110519808", "249448265156657152", "249448265219571712", "249448265274097664", "249448265328623616", "249448265378955264", "249448265437675520", "249448265701916672", "249448265752248320", "249448265802579968", "249448265865494528", "249448265920020480", "249448265966157824", "249448266029072384", "249448266100375552", "249448266150707200", "249448266201038848", "249448266251370496", "249448266314285056", "249448266377199616", "249448266431725568", "249448266725326848", "249448266775658496", "249448266825990144", "249448266884710400", "249448266943430656", "249448266997956608", "249448267065065472", "249448267132174336", "249448267178311680", "249448267228643328", "249448267287363584", "249448267346083840", "249448267408998400", "249448267459330048", "249448267513856000", "249448267568381952", "249448267622907904", "249448267669045248", "249448267723571200", "249448267769708544", "249448267824234496", "249448267874566144", "249448267920703488", "249448267966840832", "249448268012978176", "249448268063309824", "249448268113641472", "249448268390465536", "249448268465963008", "249448268528877568", "249448268583403520", "249448268654706688", "249448268717621248", "249448268776341504", "249448268835061760", "249448268881199104", "249448268927336448", "249448268973473792", "249448269032194048", "249448269074137088", "249448269120274432", "249448269166411776", "249448269208354816", "249448269254492160", "249448269300629504", "249448269346766848", "249448269397098496", "249448269447430144", "249448269501956096", "249448269556482048", "249448269602619392", "249448269661339648", "249448269917192192", "249448269959135232", "249448270005272576", "249448270051409920", "249448270101741568", "249448270156267520", "249448270206599168", "249448270252736512", "249448270298873856", "249448270345011200", "249448270391148544", "249448270441480192", "249448270487617536", "249448270533754880", "249448270609252352", "249448270663778304", "249448270714109952", "249448270768635904", "249448270810578944", "249448270852521984", "249448270898659328", "249448271309701120", "249448271368421376", "249448271414558720", "249448271464890368", "249448271506833408", "249448271552970752", "249448271594913792", "249448271641051136", "249448271691382784", "249448271754297344", "249448271813017600", "249448271863349248", "249448271922069504", "249448271968206848", "249448272018538496", "249448272064675840", "249448272115007488", "249448272161144832", "249448272219865088", "249448272526049280", "249448272588963840", "249448272643489792", "249448272702210048", "249448272760930304", "249448272811261952", "249448272857399296", "249448272924508160", "249448272995811328", "249448273058725888", "249448273113251840", "249448273188749312", "249448273243275264", "249448273285218304", "249448273343938560", "249448273394270208", "249448273448796160", "249448273494933504", "249448273549459456", "249448273830477824", "249448273897586688", "249448273968889856", "249448274023415808", "249448274077941760", "249448274136662016", "249448274220548096", "249448274291851264", "249448274358960128", "249448274413486080", "249448274715475968", "249448274799362048", "249448274870665216", "249448274941968384", "249448275025854464", "249448275084574720", "249448275155877888", "249448275227181056", "249448276267368448", "249448276347060224", "250084285833281536", "250097324804538368", "250097324955533312", "250097325031030784", "250097325114916864", "250097325194608640", "250097325274300416", "250097325358186496", "250099325034561536", "250103675433779200", "250105639223689216", "250108105889677312", "250111504873947136", "250143905201258496", "250143905356447744", "250143905410973696", "250143905469693952", "250143905532608512", "250143905587134464", "250143905633271808", "250143905687797760", "250143905733935104", "250143905775878144", "250143905826209792", "250143905868152832", "250143905918484480", "250143905964621824", "250143906019147776")

rainbow --red='UPDATE.' --red='INSERT.' --red='DELETE.*' tail -F example.log
will show
image

tail -F example.log
will show
image

why?

@nicoulaj nicoulaj added the bug label Feb 11, 2022
@nicoulaj
Copy link
Owner

I suspect this could be your shell/terminal having issues with long lines containing ANSI escape codes, and printing long lines twice. Could you try redirecting the output into a file and check ? You will need to export RAINBOW_ENABLE_STDOUT=true and export RAINBOW_ENABLE_STDERR=false to force colorization.

@nicoulaj
Copy link
Owner

Also try the other way around:

tail -F example.log | rainbow --red='UPDATE.' --red='INSERT.' --red='DELETE.*'

@yangmeishu
Copy link
Author

I suspect this could be your shell/terminal having issues with long lines containing ANSI escape codes, and printing long lines twice. Could you try redirecting the output into a file and check ? You will need to export RAINBOW_ENABLE_STDOUT=true and export RAINBOW_ENABLE_STDERR=false to force colorization.

I tried to use this solution, and changed a lot of terminal software, including changing different sh, but still there will be problems

@yangmeishu
Copy link
Author

Also try the other way around:

tail -F example.log | rainbow --red='UPDATE.' --red='INSERT.' --red='DELETE.*'

This is a good solution, and it can be used normally, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants