Oolite
Loading...
Searching...
No Matches
OOLogging.h File Reference
import "OOFoundation.h"
import "OOFunctionAttributes.h"
#include <stdarg.h>
Include dependency graph for OOLogging.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define OOLog(class, format, ...)
#define OOLogWithArguments(class, format, args)
#define OOLogIndentIf(class)
#define OOLogOutdentIf(class)
#define OOLOG_ERROR_PREFIX   @"***** ERROR: "
#define OOLOG_WARNING_PREFIX   @"----- WARNING: "
#define OOLogERR(class, format, ...)
#define OOLogWARN(class, format, ...)
#define OOLogGenericParameterError()
#define OOLogGenericSubclassResponsibility()
#define NSLog(format, ...)
#define NSLogv(format, args)
#define OODebugLog(class, format, ...)
#define OOExtraLog   OOLog

Functions

BOOL OOLogWillDisplayMessagesInClass (NSString *inMessageClass)
void OOLogIndent (void)
void OOLogOutdent (void)
void OOLogPushIndent (void)
void OOLogPopIndent (void)
void OOLogWithPrefix (NSString *inMessageClass, const char *inFunction, const char *inFile, unsigned long inLine, NSString *inPrefix, NSString *inFormat,...) OO_TAKES_FORMAT_STRING(6
void void OOLogWithFunctionFileAndLine (NSString *inMessageClass, const char *inFunction, const char *inFile, unsigned long inLine, NSString *inFormat,...) OO_TAKES_FORMAT_STRING(5
void void void OOLogWithFunctionFileAndLineAndArguments (NSString *inMessageClass, const char *inFunction, const char *inFile, unsigned long inLine, NSString *inFormat, va_list inArguments) OO_TAKES_FORMAT_STRING(5
void OOLogGenericParameterErrorForFunction (const char *inFunction)
void OOLogGenericSubclassResponsibilityForFunction (const char *inFunction)

Variables

NSString *const kOOLogSubclassResponsibility
NSString *const kOOLogParameterError
NSString *const kOOLogDeprecatedMethod
NSString *const kOOLogAllocationFailure
NSString *const kOOLogInconsistentState
NSString *const kOOLogException
NSString *const kOOLogFileNotFound
NSString *const kOOLogFileNotLoaded
NSString *const kOOLogOpenGLError
NSString *const kOOLogUnconvertedNSLog

Macro Definition Documentation

◆ NSLog

◆ NSLogv

#define NSLogv ( format,
args )
Value:
#define OOLogWithArguments(class, format, args)
Definition OOLogging.h:90

Definition at line 149 of file OOLogging.h.

◆ OODebugLog

#define OODebugLog ( class,
format,
... )
Value:
do { \
(void)class; \
if (0) \
(void)format; \
} while (0)

Definition at line 156 of file OOLogging.h.

156#define OODebugLog(class, format, ...) \
157 do { \
158 (void)class; \
159 if (0) \
160 (void)format; \
161 } while (0)

Referenced by OOCacheManager::clearCache:, OOCacheManager::objectForKey:inCache:, OOCacheManager::removeObjectForKey:inCache:, and OOCacheManager::setObject:forKey:inCache:.

◆ OOExtraLog

#define OOExtraLog   OOLog

Definition at line 166 of file OOLogging.h.

Referenced by Universe::MaintainLinkedLists.

◆ OOLog

#define OOLog ( class,
format,
... )
Value:
do { \
OOLogWithFunctionFileAndLine(class, OOLOG_FUNCTION_NAME, OOLOG_FILE_NAME, __LINE__, format, ##__VA_ARGS__); \
} \
} while (0)
BOOL OOLogWillDisplayMessagesInClass(NSString *inMessageClass)
Definition OOLogging.m:136

Definition at line 84 of file OOLogging.h.

84#define OOLog(class, format, ...) \
85 do { \
86 if (OOLogWillDisplayMessagesInClass(class)) { \
87 OOLogWithFunctionFileAndLine(class, OOLOG_FUNCTION_NAME, OOLOG_FILE_NAME, __LINE__, format, ##__VA_ARGS__); \
88 } \
89 } while (0)

Referenced by ShipEntity::abandonShip, ShipEntity::acceptAsEscort:, PlayerEntity::activateSelectedInterface, PlayerEntity(Scripting)::add:, Universe::addEntity:, PlayerEntity(Scripting)::addEqScriptForKey:, PlayerEntity(Scripting)::addMoon:, PlayerEntity(Scripting)::addPlanet:, PlayerEntity(Scripting)::addShips:, PlayerEntity(Scripting)::addShipsAt:, PlayerEntity(Scripting)::addShipsAtPrecisely:, PlayerEntity(Scripting)::addShipsWithinRadius:, StationEntity(OOPrivate)::addShipToLaunchQueue:withPriority:, PlayerEntity(Scripting)::addSystemShips:, Entity::addToLinkedLists, AddTriangle_slow(), ShipEntity(PureAI)::ai_debugMessage:, OOShipRegistry(Singleton)::allocWithZone:, OORoleSet::anyRole, GameController::applicationDidFinishLaunching:, OOTextureLoader(OOPrivate)::applySettings, ResourceManager::areRequirementsFulfilled:forOXP:andFile:, PlayerEntity(Scripting)::awardCargo:, PlayerEntity(ScriptMethods)::awardCommodityType:amount:, PlayerEntity(Scripting)::awardEquipment:, PlayerEntity::baseMass, ShipEntity::becomeExplosion, OOOXZManager(NSURLConnectionDataDelegate)::beginDownload:, ShipEntity::behaviour_scripted_ai:, OOOXPVerifier(OOPrivate)::buildDependencyGraph, CacheCompiledScript(), CachedCompiledScript(), CacheRemoveOldest(), OOJSScript::callMethod:inContext:withArguments:count:result:, OOOXZManager::cancelUpdate, CanonicalizeMaterialSpecifier(), ResourceManager::checkCacheUpToDateForPaths:, PlanetEntity::checkCloseCollisionWith:, OOFileScannerVerifierStage(OOPrivate)::checkConfigFiles, OOFileScannerVerifierStage(OOPrivate)::checkKnownFiles, Entity(OOPrivate)::checkLinkedLists, OOModelVerifierStage(OOPrivate)::checkModel:context:materials:shaders:, ResourceManager::checkOXPMessagesInPath:, OOFileScannerVerifierStage(OOPrivate)::checkPListFormat:file:folder:, ResourceManager::checkPotentialPath:searchPaths:, OOFileScannerVerifierStage(OOPrivate)::checkRootFolders, PlayerEntity(Scripting)::checkScript, OOOpenGLExtensionManager(OOPrivate)::checkShadersSupported, OOTextureVerifierStage(OOPrivate)::checkTextureNamed:inFolder:, ClassifyLHSConditionSelector(), AI(OOPrivate)::cleanActions:forHandler:state:stateMachine:, ShipEntity(Private)::cloakPassive, NSFileManager(OOExtensions)::commanderContentsOfPath:, PlayerEntity::commodityScriptNamed:, OOScriptTimer::compareByNextFireTime:, CompileScriptWithName(), CompileSystemDescriptions(), OOOXZManager(NSURLConnectionDataDelegate)::connection:didFailWithError:, OOOXZManager(NSURLConnectionDataDelegate)::connection:didReceiveData:, OOOXZManager(NSURLConnectionDataDelegate)::connection:didReceiveResponse:, OOOXZManager(NSURLConnectionDataDelegate)::connectionDidFinishLoading:, CopyDataFromFile(), OOJavaScriptEngine(Private)::createMainThreadContext, MyOpenGLView::createWindowWithSize:, MyOpenGLView::currentScreenSize, ShipEntity::dealEnergyDamage:atRange:withBias:, OOALSoundVorbisCodec::dealloc, OOConcreteTexture::dealloc, AI::debugDumpPendingMessages, PlayerEntity(Scripting)::debugMessage:, PlayerEntity(Scripting)::debugOff, PlayerEntity(Scripting)::debugOn, OOSDLJoystickManager::decodeAxisEvent:, OOSDLJoystickManager::decodeButtonEvent:, DecodeFormat(), PlayerEntity(Scripting)::decrement:, OOMaterial(OOConvenienceCreators)::defaultShaderMaterialWithName:cacheKey:configuration:macros:bindingTarget:, OOPListSchemaVerifier(OOPrivate)::delegateVerifierWithPropertyList:named:failedForProperty:withError:expectedType:, OOPListSchemaVerifier(OOPrivate)::delegateVerifierWithPropertyList:named:testProperty:atPath:againstType:error:, ResourceManager::dictionaryFromFilesNamed:inFolder:mergeMode:cache:, ResourceManager::directoryExists:create:, OOCacheManager(Private)::directoryExists:create:, OOPNGTextureLoader(OOPrivate)::doLoadTexture, GameController(OOPrivate)::doPerformGameTick, Universe(OOPrivate)::doRemoveEntity:, Universe::drawUniverse, Entity::dumpSelfState, StationEntity::dumpSelfState, WormholeEntity::dumpSelfState, AI::dumpState, Entity::dumpState, MyOpenGLView::endSplashScreen, OOSoundChannel(Private)::enqueueBuffer:, Universe::ensureEntityReallyRemoved:, OOOXZManager(NSURLConnectionDataDelegate)::ensureInstallPath, Universe::entityForUniversalID:, ErrorCallback(), ExportSystemDescriptions(), OOOXZManager(NSURLConnectionDataDelegate)::extractOXZ:, fillSquareImageDataWithCloudTexture(), fillSquareImageWithPlanetTex(), Universe::filterSortedLists, CollisionRegion::findCollisions, MyOpenGLView::findDisplayModeForWidth:Height:Refresh:, Universe::findSystemAtCoords:withGalaxy:, StationEntity::fitsInDock:andLogNoFit:, FloatRGBFromDictColor(), OOConcreteTexture(Private)::forceRebind, ShipEntity::fuelChargeRate, Universe::getContainersOfCommodity:how_much:, Universe::getContainersOfGoods:scarce:legal:, OOSystemDescriptionManager::getCoordinatesForSystem:inGalaxy:, PlayerEntity::getDestroyedBy:damageType:, MyOpenGLView::getDisplayId, MyOpenGLView::getNativeSize, OOSystemDescriptionManager::getNeighbourIDsForSystem:inGalaxy:, TextureStore::getPlanetTextureNameFor:intoData:width:height:, OOSystemDescriptionManager::getPropertiesForCurrentSystem, OOSystemDescriptionManager::getPropertiesForSystem:inGalaxy:, OOSystemDescriptionManager::getPropertiesForSystemKey:, OOSystemDescriptionManager::getProperty:forSystem:inGalaxy:, Universe::getRandomAmountOfCommodity:, OOSystemDescriptionManager::getRandomSeedForCurrentSystem, OOSystemDescriptionManager::getRandomSeedForSystem:inGalaxy:, Universe::getSafeVectorFromEntity:toDistance:fromPoint:, GetShaderSource(), Universe::getSunSkimEndPositionForShip:, Universe::getSunSkimStartPositionForShip:, GLDumpCullingState(), GLDumpFogState(), GLDumpLightState(), GLDumpMaterialState(), GLDumpStateFlags(), GlobalLog(), GlobalLog(), GlobalLog(), GlobalQuitGame(), Universe::handleOoliteException:, OOSDLJoystickManager::handleSDLEvent:, OOSystemDescriptionManager::importScriptedChanges:, PlayerEntity(Scripting)::increment:, MyOpenGLView::init, OOJavaScriptEngine::init, OOOpenALController::init, OOOXZManager::init, OOSDLJoystickManager::init, OOSoundChannel::init, InitAsyncWorkManager(), MyOpenGLView::initialiseGLWithSize:, MyOpenGLView::initSplashScreen, OOSunEntity::initSunWithColor:andDictionary:, OOSound::initWithContentsOfFile:, WormholeEntity::initWithDict:, Universe::initWithGameView:, OOEquipmentType(Private)::initWithInfo:, ShipEntity::initWithKey:definition:, OOALSoundVorbisCodec::initWithPath:, OOJSScript::initWithPath:, OOOXPVerifier(OOPrivate)::initWithPath:, OOJSScript::initWithPath:properties:, OOProbabilisticTextureManager::initWithPListName:options:anisotropy:lodBias:seed:, OOSkyQuadSet::initWithQuadsWithTexture:inArray:count:, OORoleSet(OOPrivate)::initWithRolesAndProbabilities:, OOOXZManager(NSURLConnectionDataDelegate)::installableState:, OOOXZManager(NSURLConnectionDataDelegate)::installOXZ:, KeyToIndex(), ShipEntity::landOnPlanet:, StationEntity::launchDefenseShip, StationEntity::launchEscort, StationEntity::launchIndependentShip:, StationEntity::launchMiner, ShipEntity(OOAIStationStubs)::launchPatrol, StationEntity::launchPatrol, StationEntity::launchPirateShip, ShipEntity(Private)::launchPodWithCrew:, StationEntity::launchPolice, StationEntity::launchScavenger, StationEntity::launchShipWithRole:, StationEntity::launchShuttle, OOCacheManager(Private)::loadCache, OOMesh(Private)::loadData:scaleFactor:, OOShipRegistry(OODataLoader)::loadDemoShips, OOCacheManager(Private)::loadDict, OOTextureLoader::loaderWithPath:options:, OOCommodityMarket::loadPlayerAmounts:, PlayerEntity(LoadSave)::loadPlayerFromFile:asNew:, ResourceManager::loadScripts, OOJSScript(Private)::loadScriptWithContext:, OOShipRegistry(OODataLoader)::loadShipData, AI(OOPrivate)::loadStateMachine:jsName:, OOCommodityMarket::loadStationAmounts:, Universe::locationByCode:withSun:andPlanet:, LogOpenGLState(), ResourceManager::logPaths, LogProblem(), LogProblem(), GameController::logProgress:, OOOpenGLExtensionManager(OOPrivate)::lookUpPerGPUSettingsWithVersionString:extensionsString:, PlayerEntity(OOLoadSavePrivate)::lsCommanders:directory:pageNumber:highlightName:, main(), ResourceManager::manifest:HasUnmetDependency:logErrors:, ResourceManager::manifestAllowedByScenario:, ResourceManager::manifestHasConflicts:logErrors:, ResourceManager::mergeRoleCategories:intoDictionary:, OOCheckShipDataPListVerifierStage(OOPrivate)::message:, PlayerEntity(Scripting)::messageShipAIs:, ShipEntity::missileLaunchPosition, MissionRunCallback(), MissionRunCallback(), OOCommodities(OOPrivate)::modifyGood:withScript:atStation:inSystem:localMode:, Universe::newDockWithName:andScaleFactor:, Universe::newShipWithName:usePlayerProxy:isSubentity:andScaleFactor:, Universe::newVisualEffectWithName:, OOMesh::octreeDepth, NSData(OOExtensions)::oo_dataWithOXZFile:, OOCheckOpenGLErrors(), OOCPUInfoInit(), OOGenerateMipMaps(), OOInterpretTextureSpecifier(), OOJSStartTimeLimiterWithTimeLimit_(), OOJSStopTimeLimiter(), OOJSStopTimeLimiter_(), OOJSUnreachable(), OOLogGenericParameterErrorForFunction(), OOLogGenericSubclassResponsibilityForFunction(), OOLogOutputHandlerInit(), OOPrintLogHeader(), OOPropertyListFromData(), OORandomPositionInCylinder(), OOSanitizeLegacyScriptConditionsInternal(), OOSanitizeLegacyScriptInternal(), OOFileScannerVerifierStage::pathForFile:inFolder:referencedFrom:checkBuiltIn:, ResourceManager::pathForFileNamed:inFolder:cache:, OOMusicController(Private)::pauseiTunes, OOAsyncCacheWriter::performAsyncTask, OOTextureLoader::performAsyncTask, OOOXPVerifierStage(OOInternal)::performRun, OOMusicController(Private)::playiTunesPlaylist:, OOFileScannerVerifierStage::plistNamed:inFolder:referencedFrom:checkBuiltIn:, PNGError(), PNGWarning(), PlayerEntity(OOControlsPrivate)::pollApplicationControls, MyOpenGLView(Input)::pollControls, PlayerEntity(Controls)::pollControls:, PlayerEntity(OOControlsPrivate)::pollDockedControls:, PlayerEntity(OOControlsPrivate)::pollFlightControls:, PlayerEntity(OOControlsPrivate)::pollGuiArrowKeyControls:, MyOpenGLView::populateFullScreenModelist, Universe(OOPrivate)::populateSpaceFromActiveWormholes, ResourceManager::preloadFileListFromOXZ:forFolders:, ResourceManager::preloadFilePathFor:inFolder:atPath:, AI::preserveCurrentStateMachine, OOOXZManager(NSURLConnectionDataDelegate)::processDownloadedManifests, OOOXZManager(NSURLConnectionDataDelegate)::processDownloadedOXZ, PlayerEntity(Scripting)::processSceneDictionary:atOffset:, PlayerEntity(Scripting)::processSceneString:atOffset:, OOOXZManager::processSelection, OOCache::prune, PlayerEntity(LoadSave)::quicksavePlayer, Universe::quitGame, OOConcreteMutableProbabilitySet::randomObject, ShipEntity(PureAI)::randomPauseAI:, Universe::randomShipKeyForRoleRespectingConditions:, AI::reactToMessage:context:, OOOXPVerifier(OOPrivate)::registerBaseStages, OOOXPVerifier::registerStage:, PlayerEntity(Scripting)::removeAllCargo:, Universe::removeAllEntitiesExceptPlayer, RemoveCallbackAtIndex(), PlayerEntity(Scripting)::removeEqScriptForKey:, PlayerEntity(Scripting)::removeEquipment:, Entity::removeFromLinkedLists, OOOXZManager(NSURLConnectionDataDelegate)::removeOXZ:, PlayerEntity::removeTrumble:, OOMesh::renderOpaqueParts, PlayerEntity(Scripting)::replaceVariablesInString:, ReportJSError(), AI::reportStackOverflow, GameController(OOPrivate)::reportUnhandledStartupException:, OOJavaScriptEngine::reset, OOOpenGLExtensionManager::reset, PlayerEntity(Scripting)::reset:, OOGraphicsResetManager::resetGraphicsState, GuiDisplayGen::resizeTo:characterHeight:title:, AI::restorePreviousStateMachine, ShipEntity(PureAI)::rollD:, OOCheckDemoShipsPListVerifierStage::run, OOCheckEquipmentPListVerifierStage::run, OOCheckPListSyntaxVerifierStage::run, OOCheckRequiresPListVerifierStage::run, OOCheckShipDataPListVerifierStage::run, OOListUnusedFilesStage::run, OOModelVerifierStage::run, OOOXPVerifier(OOPrivate)::run, OOCheckDemoShipsPListVerifierStage(OOPrivate)::runCheckWithDemoShips:shipData:, OOCheckEquipmentPListVerifierStage(OOPrivate)::runCheckWithEquipment:, PlayerEntity(Scripting)::runScriptActions:withContextName:forTarget:, OOOXPVerifier(OOPrivate)::runStages, OOOXPVerifier::runVerificationIfRequested, OOPListScript::runWithTarget:, SanitizeActionStatement(), SanitizeCondition(), SanitizeConditionalStatement(), OOFileScannerVerifierStage(OOPrivate)::scanDirectory:, OOFileScannerVerifierStage(OOPrivate)::scanForFiles, ShipEntity(PureAI)::scanForNearestShipMatchingPredicate:, ShipEntity(PureAI)::scriptActionOnTarget:, PlayerEntity(ScriptingPrivate)::scriptTestCondition:, PlayerEntity(Scripting)::scriptTestConditions:, OOProbabilisticTextureManager::selectTexture, PlayerEntity(Scripting)::set:, ShipEntity(AI)::setAIScript:, PlayerEntity::setCommanderDataFromDictionary:, ShipEntity(PureAI)::setCoordinates:, Universe::setDetailLevel:, PlayerEntity::setDockingClearanceStatus:, GameController::setEcoQoS:, PlayerEntity::setExtraGuiScreenKeys:definition:, PlayerEntity(Scripting)::setFuelLeak:, PlayerEntity(Scripting)::setGalacticHyperspaceBehaviourTo:, PlayerEntity(Scripting)::setGalacticHyperspaceFixedCoordsTo:, OOSunEntity::setGoingNova:inTime:, PlayerEntity(Scripting)::setMissionChoicesDictionary:, OOMesh(Private)::setModelFromModelData:name:, GameController::setMouseInteractionMode:, Universe::setNextBeacon:, PlayerEntity(Scripting)::setPlanetinfo:, OOSystemDescriptionManager::setProperties:forSystemKey:, OOSystemDescriptionManager(OOPrivate)::setProperties:inDescription:, OOSystemDescriptionManager::setProperty:forSystemKey:andLayer:toValue:fromManifest:, PlayerEntity(Scripting)::setSpecificPlanetInfo:, ShipEntity::setSubEntityTakingDamage:, ShipEntity(PureAI)::setTakeOffFromPlanet, PlayerEntity::setTrumbleValueFrom:, OOTextureLoader::setUp, PlayerEntity::setUpAndConfirmOK:saveGame:, OOOXPVerifier(OOPrivate)::setUpDependencies:forStage:, OOOXPVerifier(OOPrivate)::setUpDependents:forStage:, OOVisualEffectEntity(Private)::setUpOneStandardSubentity:, ShipEntity::setUpOneStandardSubentity:asTurret:, Universe::setUpPlanet, Universe::setUpSpace, StationEntity::setUpSubEntities, OOConcreteTexture(Private)::setUpTexture, Universe::setUpWitchspaceBetweenSystem:andSystem:, DockEntity::shipIsInDockingCorridor:, PlayerEntity(Scripting)::showShipModel:, PlayerEntity::showShipModelWithKey:shipData:personality:factorX:factorY:factorZ:inContext:, OOJavaScriptEngine::shutDown, MyOpenGLView::snapShot:, OOALBufferedSound::soundBuffer, OOALStreamedSound::soundBuffer, Universe::soundNameForCustomSoundKey:, ShipEntity::spawn:, PlayerEntity(Scripting)::spawnShip:, ShipEntity(ScriptMethods)::spawnShipsWithRole:count:, PlayerEntity(LoadSave)::startScenario, OOAIStateMachineVerifierStage::stateMachineNamed:usedByShip:, MyOpenGLView::stringToClipboard:, Entity::subEntityReallyDied:, PlayerEntity(Scripting)::subtract:, ShipEntity(AI)::suggestEscortTo:, PlayerEntity::switchHudTo:, SwitchLogFile(), ResourceManager::systemDescriptionManager, AI::takeAction:, PlayerEntity::takeEnergyDamage:from:becauseOf:weaponIdentifier:, PlayerEntity::takeScrapeDamage:from:, TessVertexCallback(), OOTextureVerifierStage::textureNamed:usedInContext:, OOTexture::textureWithGenerator:enqueue:, PlayerEntity::tidyMissilePylons, OOShipRegistry(OODataLoader)::translateOldStandardBasicSubentityDeclaration:forShip:shipData:fatalError:, OOShipRegistry(OODataLoader)::translateOldStyleFlasherDeclaration:forShip:fatalError:, TreeInsert(), TreeSplay(), PlayerEntity(OOPrivate)::tryBuyingItem:, PlayerEntity::unloadAllCargoPodsForType:toManifest:, PlayerEntity::unloadCargoPods, PlayerEntity::unloadCargoPodsForType:amount:, OOSoundChannel::update, OOSunEntity::update:, ShipEntity::update:, SkyEntity::update:, Universe::update:, OOOXZManager(NSURLConnectionDataDelegate)::updateAllOXZ, PlayerEntity(StickMapper)::updateFunction:, Entity::updateLinkedLists, PlayerEntity(OOPrivate)::updateTargeting, OOConcreteTexture(Private)::uploadTexture, ResourceManager::userRootPaths, PlayerEntity(Scripting)::useSpecialCargo:, OOAIStateMachineVerifierStage(Private)::validateAI:, ResourceManager::validateManifest:forOXP:, OOSystemDescriptionEntry(OOPrivate)::validateProperty:withValue:, ShipEntity::validForAddToUniverse, ValueIfClass(), OOCheckShipDataPListVerifierStage(OOPrivate)::verboseMessage:, Universe(OOPrivate)::verifyDescriptions, Universe::VerifyDescString, VerifyOpenGLStateInternal(), OOCheckShipDataPListVerifierStage(OOPrivate)::verifyShipInfo:withName:, Entity::warnAboutHostiles, OOMaterial(OOSubclassInterface)::willDealloc, PlayerEntity(OOPrivate)::witchStart, OOScript::worldScriptsAtPath:, OOCacheManager(Private)::write, OOCacheManager(Private)::writeDict:, NSUserDefaults(Override)::writeDictionary:toFile:, and PlayerEntity(OOLoadSavePrivate)::writePlayerToPath:.

◆ OOLOG_ERROR_PREFIX

#define OOLOG_ERROR_PREFIX   @"***** ERROR: "

Definition at line 122 of file OOLogging.h.

◆ OOLOG_WARNING_PREFIX

#define OOLOG_WARNING_PREFIX   @"----- WARNING: "

Definition at line 123 of file OOLogging.h.

◆ OOLogERR

#define OOLogERR ( class,
format,
... )
Value:
OOLogWithPrefix(class, OOLOG_FUNCTION_NAME, OOLOG_FILE_NAME, __LINE__, OOLOG_ERROR_PREFIX, format, ##__VA_ARGS__)
void OOLogWithPrefix(NSString *inMessageClass, const char *inFunction, const char *inFile, unsigned long inLine, NSString *inPrefix, NSString *inFormat,...) OO_TAKES_FORMAT_STRING(6
#define OOLOG_ERROR_PREFIX
Definition OOLogging.h:122

Definition at line 125 of file OOLogging.h.

Referenced by HeadUpDisplay::addDial:, HeadUpDisplay::addLegend:, OOShipRegistry(OODataLoader)::applyLikeShips:withKey:, ApplyOneOperator(), OODefaultShaderSynthesizer::assignIDForTexture:, OOShipRegistry(OODataLoader)::canonicalizeAndTagSubentities:, OOShipRegistry(OODataLoader)::canonicalizeSubentityDeclaration:forShip:shipData:fatalError:, PlayerEntity(Scripting)::clearMissionDescriptionForMission:, NSFileManager(OOExtensions)::commanderContentsOfPath:, PlayerEntity::createCargoPodWithType:andAmount:, MyOpenGLView::createWindowWithSize:, NSFileManager(OOExtensions)::defaultCommanderPath, PlayerEntity::dialMissileStatus, ShipEntity(PureAI)::disengageAutopilot, DockEntity::dockingInstructionsForShip:, HeadUpDisplay(Private)::drawCustomImage:, ExpandDigitKey(), ExpandStringKeyFromDescriptions(), WormholeEntity::identFromShip:, PlanetEntity(OOPrivate)::initAsAtmosphereForPlanet:dictionary:, PlanetEntity::initFromDictionary:withAtmosphere:andSeed:, Universe(OOPrivate)::initTargetFramebufferWithViewSize:, OOTextureLoader::initWithPath:options:, OOJSScript::initWithPath:properties:, InterruptHandler(), InterruptHandler(), PlayerEntity::isDocked, OOVisualEffectEntity(SubEntityRelationship)::isShipWithSubEntityShip:, ShipEntity(SubEntityRelationship)::isShipWithSubEntityShip:, OOScript::jsAIScriptFromFileNamed:properties:, OOScript::jsScriptFromFileNamed:properties:, OOShipRegistry(OODataLoader)::loadAndApplyShipDataOverrides:, LoadCompatibilityScript(), OOCombinedEmissionMapGenerator::loadTexture, main(), OOShipRegistry(OODataLoader)::makeShipEntriesMutable:, AI::message:, OOScript::name, OperationCallback(), OODefaultShaderSynthesizer::performStage:, RandomSeedFromString(), AI::reactToMessage:context:, OOShipRegistry(OODataLoader)::removeUnusableEntries:shipMode:, AI::reportStackOverflow, OOScript::runWithTarget:, ScanQuaternionFromString(), ScanVectorAndQuaternionFromString(), ScanVectorFromString(), OOScript::scriptDescription, OOScript::scriptsFromFileAtPath:, OOScript::scriptsFromFileNamed:, ShipEntity::selectMissile, OOCharacter(Private)::setCharacterFromDictionary:, PlayerEntity(Scripting)::setMissionChoicesDictionary:, PlayerEntity(Scripting)::setMissionDescription:forMission:, PlayerEntity(Scripting)::setMissionInstructions:forMission:, PlayerEntity(Scripting)::setMissionInstructionsList:forMission:, Universe::setSystemDataForGalaxy:planet:key:value:fromManifest:forLayer:, Universe::soundNameForCustomSoundKey:, Universe::spawnShip:, ShipEntity(Private)::subEntityReallyDied:, PlayerEntity(OOControlsPrivate)::switchToThisView:fromView:andProcessWeaponFacing:justNotify:, AI::takeAction:, OOTexture::textureWithGenerator:enqueue:, Universe::tradeInValueForCommanderDictionary:, OOShipRegistry(OODataLoader)::translateOldStyleSubentityDeclaration:forShip:shipData:fatalError:, Universe::update:, OOShipRegistry(OODataLoader)::validateNewStyleStandardSubentityDeclaration:forShip:fatalError:, OOShipRegistry(OODataLoader)::validateNewStyleSubentityDeclaration:forShip:fatalError:, Entity::validForAddToUniverse, Universe::VerifyDesc, Universe(OOPrivate)::verifyEntitySessionIDs, OOScript::version, OOScript::worldScriptsAtPath:, and OODefaultShaderSynthesizer::writeLightMaps.

◆ OOLogGenericParameterError

#define OOLogGenericParameterError ( )
Value:
void OOLogGenericParameterErrorForFunction(const char *inFunction)
Definition OOLogging.m:459

Definition at line 137 of file OOLogging.h.

Referenced by EnsureCorrectDataSize(), EntityFromArgumentList(), EntityFromArgumentList(), OOMaterial::name, and OOScalePixMap().

◆ OOLogGenericSubclassResponsibility

◆ OOLogIndentIf

◆ OOLogOutdentIf

#define OOLogOutdentIf ( class)

◆ OOLogWARN

#define OOLogWARN ( class,
format,
... )
Value:
OOLogWithPrefix(class, OOLOG_FUNCTION_NAME, OOLOG_FILE_NAME, __LINE__, OOLOG_WARNING_PREFIX, format, ##__VA_ARGS__)
#define OOLOG_WARNING_PREFIX
Definition OOLogging.h:123

Definition at line 126 of file OOLogging.h.

Referenced by PlayerEntity(Scripting)::addMoon:, PlayerEntity(Scripting)::addPlanet:, OOTextureLoader(OOPrivate)::applySettings, SkyEntity::changeProperty:withDictionary:, OOSunEntity::changeSunProperty:withDictionary:, AI(OOPrivate)::cleanActions:forHandler:state:stateMachine:, AI(OOPrivate)::cleanHandlers:forState:stateMachine:, MyOpenGLView::createWindowWithSize:, OOAsyncQueue::dealloc, PlayerEntity(OOControlsPrivate)::handleGameOptionsScreenKeys, MyOpenGLView::initSplashScreen, OOShipRegistry(OODataLoader)::loadAndMergeShipyard:, LoadCompatibilityScript(), OOMesh(Private)::loadData:scaleFactor:, OOTextureLoader::loaderWithTextureSpecifier:extraOptions:folder:, AI(OOPrivate)::loadStateMachine:jsName:, OOInterpretTextureSpecifier(), OOLookUpPluralDescriptionPRIV(), ShipEntity(OOAIPrivate)::performHyperSpaceExitReplace:toSystem:, PlayerEntity(Controls)::processKeyCode:, SkyEntity(OOPrivate)::readColor1:andColor2:andColor3:andColor4:fromDictionary:, OODefaultShaderSynthesizer::readOneChannelForTextureSpec:mapName:, OODefaultShaderSynthesizer::readRGBForTextureSpec:mapName:, PlayerEntity(Scripting)::removeAllCargo:, RunDeferredOperations(), OOShipRegistry(OODataLoader)::sanitizeConditions:, ShipEntity::selectMissile, PlayerEntity::setCommanderDataFromDictionary:, PlayerEntity::setGuiToGameOptionsScreen, Universe::setUpBreakPattern:orientation:forDocking:, ShipEntity::setUpEscorts, ShipEntity(Private)::setUpMixedEscorts, Universe::setUpSpace, Universe::spawnShip:, OOTexture::textureWithName:inFolder:options:anisotropy:lodBias:, TimerFinalize(), TimerFinalize(), OOShipRegistry(OODataLoader)::translateOldStandardBasicSubentityDeclaration:forShip:shipData:fatalError:, OOShipRegistry(OODataLoader)::translateOldStyleSubentityDeclaration:forShip:shipData:fatalError:, OOShipRegistry(OODataLoader)::validateNewStyleFlasherDeclaration:forShip:fatalError:, OOShipRegistry(OODataLoader)::validateNewStyleStandardSubentityDeclaration:forShip:fatalError:, ShipEntity::verifiedMissileTypeFromRole:, OODefaultShaderSynthesizer::writeNormalIfNeeded, and OODefaultShaderSynthesizer::writeTextureCoordRead.

◆ OOLogWithArguments

#define OOLogWithArguments ( class,
format,
args )
Value:
do { \
OOLogWithFunctionFileAndLineAndArguments(class, OOLOG_FUNCTION_NAME, OOLOG_FILE_NAME, __LINE__, format, args); \
} \
} while (0)

Definition at line 90 of file OOLogging.h.

90#define OOLogWithArguments(class, format, args) \
91 do { \
92 if (OOLogWillDisplayMessagesInClass(class)) { \
93 OOLogWithFunctionFileAndLineAndArguments(class, OOLOG_FUNCTION_NAME, OOLOG_FILE_NAME, __LINE__, format, args); \
94 } \
95 } while (0)

Function Documentation

◆ OOLogGenericParameterErrorForFunction()

void OOLogGenericParameterErrorForFunction ( const char * inFunction)

Definition at line 459 of file OOLogging.m.

460{
461 OOLog(kOOLogParameterError, @"***** %s: bad parameters. (This is an internal programming error, please report it.)", inFunction);
462}
NSString *const kOOLogParameterError
Definition OOLogging.m:596

References kOOLogParameterError, and OOLog.

◆ OOLogGenericSubclassResponsibilityForFunction()

void OOLogGenericSubclassResponsibilityForFunction ( const char * inFunction)

Definition at line 464 of file OOLogging.m.

465{
466 OOLog(kOOLogSubclassResponsibility, @"***** %s is a subclass responsibility. (This is an internal programming error, please report it.)", inFunction);
467}
NSString *const kOOLogSubclassResponsibility
Definition OOLogging.m:595

References kOOLogSubclassResponsibility, and OOLog.

◆ OOLogIndent()

void OOLogIndent ( void )

Definition at line 345 of file OOLogging.m.

346{
347 INDENT_LOCK();
348
350
352}
OOINLINE unsigned GetIndentLevel(void) PURE_FUNC
Definition OOLogging.m:289
OOINLINE void SetIndentLevel(unsigned level)
Definition OOLogging.m:295
#define INDENT_LOCK()
Definition OOLogging.m:282
#define INDENT_UNLOCK()
Definition OOLogging.m:285

References GetIndentLevel(), INDENT_LOCK, INDENT_UNLOCK, and SetIndentLevel().

Referenced by StationEntity::dumpSelfState, Entity::dumpState, GLDumpCullingState(), GLDumpFogState(), GLDumpLightState(), GLDumpMaterialState(), GLDumpStateFlags(), LogOpenGLState(), OOCheckShipDataPListVerifierStage(OOPrivate)::message:, OOCheckOpenGLErrors(), OOFileScannerVerifierStage::plistNamed:inFolder:referencedFrom:checkBuiltIn:, AI::reportStackOverflow, OOOXPVerifier(OOPrivate)::runStages, AI::takeAction:, OOCheckShipDataPListVerifierStage(OOPrivate)::verboseMessage:, and VerifyOpenGLStateInternal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOLogOutdent()

void OOLogOutdent ( void )

Definition at line 354 of file OOLogging.m.

355{
356 INDENT_LOCK();
357
358 unsigned indentLevel = GetIndentLevel();
359 if (indentLevel != 0)
360 SetIndentLevel(indentLevel - 1);
361
363}

References GetIndentLevel(), INDENT_LOCK, INDENT_UNLOCK, and SetIndentLevel().

Referenced by StationEntity::dumpSelfState, GLDumpCullingState(), GLDumpFogState(), GLDumpLightState(), GLDumpMaterialState(), GLDumpStateFlags(), LogOpenGLState(), OOCheckOpenGLErrors(), OOFileScannerVerifierStage::plistNamed:inFolder:referencedFrom:checkBuiltIn:, AI::reportStackOverflow, OOOXPVerifier(OOPrivate)::runStages, AI::takeAction:, and VerifyOpenGLStateInternal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOLogPopIndent()

void OOLogPopIndent ( void )

Definition at line 323 of file OOLogging.m.

324{
325 OOLogIndentStackElement* elem = NULL;
326 NSMutableDictionary* threadDict = nil;
327 NSValue* val = nil;
328
329 threadDict = [[NSThread currentThread] threadDictionary];
330 val = [threadDict objectForKey:kIndentStackKey];
331
332 elem = [val pointerValue];
333
334 if (elem != NULL) {
335 [threadDict setObject:[NSNumber numberWithUnsignedInt:elem->indent] forKey:kIndentLevelKey];
336 [threadDict setObject:[NSValue valueWithPointer:elem->link] forKey:kIndentStackKey];
337 free(elem);
338 } else {
339 OOLogInternal(OOLOG_BAD_POP_INDENT, @"OOLogPopIndent(): state stack underflow.");
340 }
341}
static NSString *const kIndentStackKey
Definition OOLogging.m:50
#define OOLogInternal(cond, format,...)
Definition OOLogging.m:97
static NSString *const kIndentLevelKey
Definition OOLogging.m:49
#define OOLOG_BAD_POP_INDENT
Definition OOLogging.m:64
return nil
OOLogIndentStackElement * link
Definition OOLogging.m:70

References nil, OOLOG_BAD_POP_INDENT, and OOLogInternal.

Referenced by Entity::dumpState, AI(OOPrivate)::loadStateMachine:jsName:, OOOXPVerifierStage(OOInternal)::performRun, OOOXPVerifier(OOPrivate)::runStages, and OOCheckShipDataPListVerifierStage(OOPrivate)::verifyShipInfo:withName:.

Here is the caller graph for this function:

◆ OOLogPushIndent()

void OOLogPushIndent ( void )

Definition at line 301 of file OOLogging.m.

302{
303 OOLogIndentStackElement* elem = NULL;
304 NSMutableDictionary* threadDict = nil;
305 NSValue* val = nil;
306
307 elem = malloc(sizeof *elem);
308 if (elem != NULL) {
309 threadDict = [[NSThread currentThread] threadDictionary];
310 val = [threadDict objectForKey:kIndentStackKey];
311
312 elem->indent = [[threadDict objectForKey:kIndentLevelKey] intValue];
313 elem->link = [val pointerValue];
314
315 /*
316 Clang static analyzer reports elem not released here. It is in fact
317 released in OOLogPopIndent().
318 */
319 [threadDict setObject:[NSValue valueWithPointer:elem] forKey:kIndentStackKey];
320 }
321}

References OOLogIndentStackElement::indent, OOLogIndentStackElement::link, and nil.

Referenced by Entity::dumpState, AI(OOPrivate)::loadStateMachine:jsName:, OOOXPVerifierStage(OOInternal)::performRun, OOOXPVerifier(OOPrivate)::runStages, and OOCheckShipDataPListVerifierStage(OOPrivate)::verifyShipInfo:withName:.

Here is the caller graph for this function:

◆ OOLogWillDisplayMessagesInClass()

BOOL OOLogWillDisplayMessagesInClass ( NSString * inMessageClass)

Definition at line 136 of file OOLogging.m.

137{
138 id value = nil;
139
140 if (!Inited())
141 return NO;
142
144 return sOverrideValue;
145
146 [sLock lock];
147
148 // Look for cached value
149 value = [sDerivedSettingsCache objectForKey:inMessageClass];
150 if (EXPECT_NOT(value == nil)) {
151 @try {
152 // No cached value.
153 value = ResolveDisplaySetting(inMessageClass);
154
155 if (value != nil) {
157 sDerivedSettingsCache = [[NSMutableDictionary alloc] init];
158 [sDerivedSettingsCache setObject:value forKey:inMessageClass];
159 }
160 }
161 @catch (id exception) {
162 [sLock unlock];
163 @throw exception;
164 }
165 }
166 [sLock unlock];
167
168 OOLogInternal(OOLOG_SETTING_RETRIEVE, @"%@ is %s", inMessageClass, (value == kTrueToken) ? "on" : "off");
169 return value == kTrueToken;
170}
#define EXPECT_NOT(x)
static NSString *const kTrueToken
Definition OOLogging.m:92
#define OOLOG_SETTING_RETRIEVE
Definition OOLogging.m:60
static BOOL sOverrideValue
Definition OOLogging.m:89
OOINLINE BOOL Inited(void)
Definition OOLogging.m:128
static NSLock * sLock
Definition OOLogging.m:76
static BOOL sOverrideInEffect
Definition OOLogging.m:88
static id ResolveDisplaySetting(NSString *inMessageClass)
Definition OOLogging.m:783
static NSMutableDictionary * sDerivedSettingsCache
Definition OOLogging.m:78

References EXPECT_NOT, Inited(), kTrueToken, nil, OOLOG_SETTING_RETRIEVE, OOLogInternal, ResolveDisplaySetting(), sDerivedSettingsCache, sOverrideInEffect, and sOverrideValue.

Referenced by Universe::addEntity:, Entity::dumpState, GlobalLog(), GlobalLog(), GlobalLog(), ResourceManager::loadScripts, LogOpenGLState(), LogProblem(), LogProblem(), OOCheckOpenGLErrors(), OOLogWithFunctionFileAndLineAndArguments(), OOLogWithPrefix(), OONSLogCStringFunction(), ReportJSError(), AI::reportStackOverflow, SyntaxIssue(), OOCheckShipDataPListVerifierStage(OOPrivate)::verboseMessage:, and VerifyOpenGLStateInternal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOLogWithFunctionFileAndLine()

void void OOLogWithFunctionFileAndLine ( NSString * inMessageClass,
const char * inFunction,
const char * inFile,
unsigned long inLine,
NSString * inFormat,
... )

References OO_TAKES_FORMAT_STRING, and OOLogWithFunctionFileAndLine().

Referenced by OOLogWithFunctionFileAndLine(), and OONSLogCStringFunction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOLogWithFunctionFileAndLineAndArguments()

void void void OOLogWithFunctionFileAndLineAndArguments ( NSString * inMessageClass,
const char * inFunction,
const char * inFile,
unsigned long inLine,
NSString * inFormat,
va_list inArguments )

References OO_TAKES_FORMAT_STRING, and OOLogWithFunctionFileAndLineAndArguments().

Referenced by OOCheckShipDataPListVerifierStage(OOPrivate)::message:, OOLogWithFunctionFileAndLineAndArguments(), SyntaxIssue(), and OOCheckShipDataPListVerifierStage(OOPrivate)::verboseMessage:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOLogWithPrefix()

void OOLogWithPrefix ( NSString * inMessageClass,
const char * inFunction,
const char * inFile,
unsigned long inLine,
NSString * inPrefix,
NSString * inFormat,
... )

Variable Documentation

◆ kOOLogAllocationFailure

NSString* const kOOLogAllocationFailure
extern

◆ kOOLogDeprecatedMethod

NSString* const kOOLogDeprecatedMethod
extern

Definition at line 597 of file OOLogging.m.

◆ kOOLogException

◆ kOOLogFileNotFound

◆ kOOLogFileNotLoaded

NSString* const kOOLogFileNotLoaded
extern

Definition at line 602 of file OOLogging.m.

◆ kOOLogInconsistentState

◆ kOOLogOpenGLError

NSString* const kOOLogOpenGLError
extern

Definition at line 603 of file OOLogging.m.

Referenced by OOCheckOpenGLErrors().

◆ kOOLogParameterError

◆ kOOLogSubclassResponsibility

NSString* const kOOLogSubclassResponsibility
extern

◆ kOOLogUnconvertedNSLog

NSString* const kOOLogUnconvertedNSLog
extern

Definition at line 604 of file OOLogging.m.