Log Settings To Disable Automatic Logging

What value should set in levels property of CLogRouter to disable automatic logging of anything? Documentation says, that when levels is empty, everything is logged. How to log nothing?

Why do I need this? I just want to define my log routes, but forbit Yii from logging anything – I want to have full control over logging process and log only data, that I put through Yii:log() method.

How about setting a custom level and use that one in you Yii:log() calls.

That is a reasonable solution.

But it sounds to me like a typical workaround. So, it seems, that scenario like mine, isn’t currently handled and – what do you think about rising an issue to fix this?

IMHO setting levels to empty should handle "my" scenario (do not automatically log anything), while setting it to "all" or "*" should actually log everything.

It’s not a workaround it’s a solution because to log only “your” calls you still need to set a custom level. If you don’t set a custom level, “info” is the default and then the Yii core info messages would be logged too and you don’t want that. So in the end you still need to set your custom level in the log() call and in the logger config.

Ah, I see. Thanks! :]