How do I log debug messages from my plug-in code?

Tam66662

New Member
Hi, hoping there is a simple solution for this already built into OBS. I'm writing a plugin, and to better understand OBS's API documentation and my own code algorithms, I'd like to be able to log messages that go to the %APPDATA%\obs-studio\logs\<date>.txt file.

Is there a built-in method for this already that I can use? I'm looking at other plugins and I see them several different types: hlog, blog, LOG, RTMP_Log, FTL_LOG, etc.

Any help would be greatly appreciated!
 

Tam66662

New Member
Ahhh, I found the one to use. It's "blog".

Originally, I had used it as blog(LOG_DEBUG, "...") and nothing was showing up in the log file, which is why I originally posted this question. Turns out I needed to use blog(LOG_INFO, "...").

Answered my own question.
 
Top