Extending debug.ini

Author Message

Jerome Despatis

Thursday 11 March 2010 6:54:30 am

Hi,

I'm coding an extension, and I'd like to use conditional debug in my extension. I mean I put a debug line in my code, and the latter will really be printed in a debug file if settings in my extension allows it.

To achieve this, I've looked at the eZDebugSetting that seems to suit my need

In my extension, I have: eZDebugSetting::writeError( 'dmv-workflow', "my test string", "my test label" );

And in my extension settings, I have a debug.ini.append.php that contains:

[GeneralCondition]
dmv-workflow=enabled

However It doesn't print any log message in error.log

(the master switch for conditional debugging is enabled, ConditionDebug=enabled)

Any idea how to solve this problem ?

Thanks for your precious help !

Nicolas Pastorino

Thursday 11 March 2010 7:10:04 am

Hello Jérôme,

While i am sure this works with the debug output, i have not tested this with a log file.
Anyway to test that it works fine with the normal debug output first ?

Let us know,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Jerome Despatis

Thursday 11 March 2010 7:39:20 am

Hi

In a template operator from my extension for example, I have the lines:

eZDebug::writeError("my test string with eZDebug", "my test label with eZDebug" );
eZDebugSetting::writeError( 'dmv-workflow', "my test string with eZDebugSetting", "my test label with eZDebugSetting" );

I clean the cache, then i go to a page where my template operator is executed, and i only see:

[ Mar 11 2010 16:34:57 ] [192.168.0.45] my test label with eZDebug:
my test string with eZDebug

Definitely, my debug.ini.append.ini is not merged with debug.ini

Any idea is welcome !

Jerome Despatis

Thursday 11 March 2010 8:29:11 am

Another observation:

If I put my debug.ini.append.php in settings/override, then eZDebugSetting::writeError( 'dmv-workflow', "...") works...

It seems I can't use a debug.ini.append.php in an extension.

What am I missing ?

Thanks for your help

Jerome Despatis

Thursday 11 March 2010 10:22:50 am

As I think it's a bug, i've filled in a bug report:

http://issues.ez.no/IssueView.php?Id=16417

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.