Currently there is no convention on how the warning and error messages are displayed by the statedump utility.
It would be useful if the warning and error messages were displayed in a visually distinct way on the console.
For example, the warning messages could be prefixed with word "WARN" or "WARNING", and the error messages could be prefixed with word "ERROR". In case of multiline warning/error messages (although those should be possibly avoided), all lines should be prefixed (so it'd be easier to filter).
Maybe the words "ERROR"/"WARNING" could be even coloured differently on the terminal (but this would need some thinking-through).