logdebug.inc - Simple debug logging
1 Attachment(s)
This is a simple include file which provides a LogDebug stock intended for use in debugging. Just #include it, call InitDebugLog, and use LogDebug wherever you desire. Requires SM 1.7 or later to compile and run.
PHP Code:
PHP Code:
If you define NO_DEBUG before #including the file, all functionality will be disabled. No cvar will be created and LogDebug will always return false. |
Re: logdebug.inc - Simple debug logging
Awesome work McKay - I will incorporate this into my plugins from now on since I usually add debug options anyways.
Thank you! |
Re: logdebug.inc - Simple debug logging
Can you make it not compile altogether without if defined wrappers around everything?
|
Re: logdebug.inc - Simple debug logging
Nice, thanks. I'll probably get rid of FF2's debug functions for this.
|
Re: logdebug.inc - Simple debug logging
Quote:
|
Re: logdebug.inc - Simple debug logging
Haven't tested it, but it doesn't seem like g_DebugAdminFlag is ever set to what's specified in InitDebugLog() ?
Also it would be really awesome if it could also accept an override, falling back to the flag if not present. :) |
Re: logdebug.inc - Simple debug logging
Code:
#if !defined NO_DEBUG |
Re: logdebug.inc - Simple debug logging
Quote:
PHP Code:
|
Re: logdebug.inc - Simple debug logging
Quote:
Quote:
|
Re: logdebug.inc - Simple debug logging
A few optional things you might want to do:
|
All times are GMT -4. The time now is 12:58. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.