Is CLogFilter named right?

Hi all,

My @version is 1.1.10.

As I see from default implementation of CLogFilter it acts mostly for decoration in concrete log route. But my main question – is it safe to use it as a real filter?

LogRoutes filters filter() method called from collectLogs and pass in this filter() method logroute`s logs variable by reference. I already saw such approach in many places. But is it really safe?

Or if it passed to us be reference – it means we can easily update/unset it rows?

And what if now we have 1—1 relation between logroute and filter, but in future we will want something line 1—N? Then it becomes not safe, I think.

As I see now anything with filter() method can play two roles:

  • messages prepending/decoration

  • something more advanced filtering than simple "level && category" scheme in CLogger

Please give your opinions.

Thanks.

Hi and welcome to the forum.

There is an open issue @ github: #648

If you have additional remarks/thoughts please post them there.

Hi, Y!!,

Thanks for the link – I’ll post it there also and reply there.