Kate could reinvent the wheel (and maybe it does), but IMO a good general approach would be if we could enable interpreting ANSI color codes and such. Then we could just
dmesg --color=always | kate --stdin
and the colors would simply come from dmesg
. I haven't found such functionality in/for Kate though.