How to write debug messages?

I need write some debug messages to file. How to do it without pain?

I tryed use dbg like that: dbg(D_INFO) << string_fprmat("%s/%s), s1, s2). But my logg.txt is almost empty.
I’m doing it wrong?

Use DebugLog() << “SomeText” << someValue;

Use DebugLog() << "SomeText" << someValue;
Thank you. It's work.

Since there were some inaccurate accusations in this thread, they’ve been deleted. Carry on.