This wiki was in read-only mode for many years, but can now be edited again. A lot of information will need to be updated.

Bz getDebugLevel: Difference between revisions

From BZFlagWiki
Jump to navigation Jump to search
Sigonasr2 (talk | contribs)
Create API Function Page. Include Example.
 
(No difference)

Latest revision as of 07:25, 19 October 2011

int bz_getDebugLevel ()


Gets the debugging level of the server.

Returns:
An integer containing the BZFS debugging level.

Example

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;