Assuming GNU grep, add --line-buffered
to your command line, eg.
tail -f logfile | grep --line-buffered org.springframework | cut -c 25-
Edit:
I see grep buffering isn't the only problem here, as cut doesn't allow linewise buffering.
you might want to try replacing it with something you can control, such as sed:
tail -f logfile | sed -u -n -e '/org.springframework/ s/(.{0,25}).*$/1/p'
or awk
tail -f logfile | awk '/org.springframework/ {print substr($0, 0, 25);fflush("")}'
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…