Dmesg is a command that displays the message buffer of the kernel and provides a verbose output regarding what is our operating system is doing. If you set up ufw, for example, you'll see its block logs here.
But if you write only
it'll print out the current buffer and exit. To make it continous you need to pass in another parameter:
This will provide a log like you had
tail -f'd it.