How to handle debug()

View: New views
9 Messages — Rating Filter:   Alert me  

How to handle debug()

by Felix Oertel-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi everyone,

as I can see, the debug() function in config_default is the one to be
used by now. It checks for global errorhandling
($GLOABALS['error']->debug()) and provides a fallback to t3lib_div::debug().

I think it would be a good idea to move debug() into a namespace
(providing a dummy-function for compatibility reasons) and remove all
direct usage of t3lib_div::debug() from the code.

I would do that, just wondred what you guys are thinking.

Regards, Felix
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: How to handle debug()

by Steffen Kamper-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Felix Oertel schrieb:

> Hi everyone,
>
> as I can see, the debug() function in config_default is the one to be
> used by now. It checks for global errorhandling
> ($GLOABALS['error']->debug()) and provides a fallback to
> t3lib_div::debug().
>
> I think it would be a good idea to move debug() into a namespace
> (providing a dummy-function for compatibility reasons) and remove all
> direct usage of t3lib_div::debug() from the code.
>
> I would do that, just wondred what you guys are thinking.
>
> Regards, Felix

i don't see a need for. And where is t3lib_div::debug() used in core?

debug has to be initialized that early to allow debug extensions to hook
in, so config_default is a good place for.

vg Steffen
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: How to handle debug()

by Martin Kutschker-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Steffen Kamper schrieb:
>
> debug has to be initialized that early to allow debug extensions to hook
> in, so config_default is a good place for.

I see no good reason to have a function in config_default.php. There are other ways to have it
available early. And the fact that it isn't scoped in a class or at least prefix (eg t3_debug)
doesn't make it more attractive to me. *

But the whole config_default.php stinks and should be refactored. There's too much code in ot that's
not configuration, let alone a default configuration.

Masi

* Actually I never use it. I usually make manually calls to t3lib_div::print_array as I am too lazy
to setup the devIP :)
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: How to handle debug()

by Mathias Schreiber [wmdb >] :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Martin Kutschker schrieb:
> * Actually I never use it. I usually make manually calls to t3lib_div::print_array as I am too lazy
> to setup the devIP :)

You echo stuff out on live client projects?
That's so Rambo... respect :)



--
TYPO3 certified interogator
T3DD09 Entertainer
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: How to handle debug()

by Georg Ringer-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mathias Schreiber [wmdb >] schrieb:
> Martin Kutschker schrieb:
>> * Actually I never use it. I usually make manually calls to
>> t3lib_div::print_array as I am too lazy
>> to setup the devIP :)
>
> You echo stuff out on live client projects?
> That's so Rambo... respect :)

maybe all his live client projects are bugfree? ;)
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: How to handle debug()

by Steffen Kamper-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Mathias Schreiber [wmdb >] schrieb:
> You echo stuff out on live client projects?
> That's so Rambo... respect :)
>

be aware of the austrian rambo :)

vg Steffen
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: How to handle debug()

by Martin Kutschker-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mathias Schreiber [wmdb >] schrieb:
> Martin Kutschker schrieb:
>> * Actually I never use it. I usually make manually calls to
>> t3lib_div::print_array as I am too lazy
>> to setup the devIP :)
>
> You echo stuff out on live client projects?
> That's so Rambo... respect :)

No, not live sites. Though on a live sites you can embed th output of print_r() within an HTML comment.

Masi
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: How to handle debug()

by Oliver Klee-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Steffen Kamper schrieb:
> Mathias Schreiber [wmdb >] schrieb:
>> You echo stuff out on live client projects?
>> That's so Rambo... respect :)
>
> be aware of the austrian rambo :)

Thanks, guys, you've just put a big grin on my face. :-))


Oli
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

Re: How to handle debug()

by Martin Kutschker-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Oliver Klee schrieb:
> Hi,
>
> Steffen Kamper schrieb:
>> Mathias Schreiber [wmdb >] schrieb:
>>> You echo stuff out on live client projects?
>>> That's so Rambo... respect :)
>> be aware of the austrian rambo :)
>
> Thanks, guys, you've just put a big grin on my face. :-))

And I'll wipe it off your face ;)

Masi
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev@...
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev