bz_getDebugLevel

From BZFlagWiki
Revision as of 07:25, 19 October 2011 by Sigonasr2 (Talk | contribs) (Create API Function Page. Include Example.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

int bz_getDebugLevel ()


Gets the debugging level of the server.

Returns:
An integer containing the BZFS debugging level.

Example[edit]

Creates a basic BZFS output from debug mode for administrators to watch. Uses bz_getDebugLevel() to determine which messages actually show up.

case bz_eLoggingEvent: {
	if (((bz_LoggingEventData_V1*)eventData)->level==bz_getDebugLevel()) {
		bz_sendTextMessagef(BZ_SERVER,BZ_ALLUSERS,
		"[BZFS] %s",((bz_LoggingEventData_V1*)eventData)->message.c_str());
	}
}break;