Different level of logging? Unique prefix?

Right now I only know one level of logging: log("some format %d", someValue); Turns out this outputs to the DEBUG level in logcat. Does anyone know how to output to INFO or other level of logcat?


Also, by default the above log() call will output something like below:

01-20 21:15:53.240 3472-3498/com.blackmirror.chopsticks D/cocos2d-x debug info: screen resolution = 1080.000000 x 1776.000000

But then when the game starts up, it also automatically output a line:

01-20 21:15:54.260 3472-3498/com.blackmirror.chopsticks D/cocos2d-x debug info: create rendererRecreatedListener for GLProgramState

Since I don’t want to see this line in my logcat, I was forced to add a “DEBUG” prefix to all my log() calls like log("DEBUG my real log message here"), which is ugly. Does anyone has a good way to filter out the aforementioned automatically printed log line?

No one has a solution?

Moving this out of C++ category, just to see if this will gain a bit traction.

Not sure no reply means my question is simple stupid enough that no one think it’s valid, or it’s too hard that no one knows the answer?

I think it’s a legit question

Try this

Thank you, @nite !

Okay, so define my own log macro. That works~