bz_getDebugLevel

From BZFlagWiki
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;