(8-bit Wrapping, wrapping) Brainfuck, 11480 bytes
-[[>+<----->+<]>]>-.[->+>+<<]>>-----.++++<-..+.-----.+++++>.-----<.++++>.---<-.+++++>.<+.-..---->.+++++<+.---->.<-.++++>.----<+.+++++>.----<-.++++.+..-.>
This can almost certainly be golfed; in fact, it was made with this wonderful though suboptimal tool.
TODO
I will golf it tomorrow, as it is quite late in my timezone.Attempt This Online!
Outputs in the example format: "2-112-2-1-211-2-1-2-1221". Originally, this was in severe need of a golf, having been made by an automated tool. I have now optimized it a little. It now uses a similar technique to Level River St's answer, though I arrived at it independently, and it differs in the details; instead of 51, the starting value is 50.