Someone sends you a dump of the kernel log, or you grab one from a sick server before restarting it. You can run the normal dmesg filters on that file.
Save the buffer in raw form, which keeps the level markers on each line:
sudo dmesg -r > kernel.raw
Then read it back, on the same machine or a different one:
dmesg -F kernel.raw --level=err,warn
dmesg -F kernel.raw -x | less
No sudo is needed for reading a file. The -r on the way out is the important part. Without it the levels are stripped, and the level and facility filters have nothing to work with.
I like it for bug reports. One file holds everything, and the person reading it can slice it however they want.
The man page notes that -F does not read the kmsg format, so a file copied straight from /dev/kmsg will not work. Use the output of dmesg -r. Also look through the file before you send it anywhere. Kernel messages can contain MAC addresses, disk serial numbers, device names and sometimes program names with their arguments, which you may not want to post in a public forum.
Further reading: dmesg man page