Oolite
Loading...
Searching...
No Matches
OOLogStub.m File Reference
import "OOLogging.h"
Include dependency graph for OOLogStub.m:

Go to the source code of this file.

Functions

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

Variables

static NSMutableArray * sRecordedMessages
NSString *const kOOLogSubclassResponsibility = @"general.error.subclassResponsibility"
NSString *const kOOLogParameterError = @"general.error.parameterError"
NSString *const kOOLogDeprecatedMethod = @"general.error.deprecatedMethod"
NSString *const kOOLogAllocationFailure = @"general.error.allocationFailure"
NSString *const kOOLogInconsistentState = @"general.error.inconsistentState"
NSString *const kOOLogException = @"exception"
NSString *const kOOLogFileNotFound = @"files.notFound"
NSString *const kOOLogFileNotLoaded = @"files.notLoaded"
NSString *const kOOLogOpenGLError = @"rendering.opengl.error"
NSString *const kOOLogUnconvertedNSLog = @"unclassified"

Function Documentation

◆ OOLogGenericParameterErrorForFunction()

void OOLogGenericParameterErrorForFunction ( const char * inFunction)

Definition at line 65 of file OOLogStub.m.

66{
67 OOLog(kOOLogParameterError, @"***** %s: bad parameters. (This is an internal programming error, please report it.)", inFunction);
68}
#define OOLog(class, format,...)
Definition OOLogging.h:84
NSString *const kOOLogParameterError
Definition OOLogging.m:596

References kOOLogParameterError, and OOLog.

◆ OOLogGenericSubclassResponsibilityForFunction()

void OOLogGenericSubclassResponsibilityForFunction ( const char * inFunction)

Definition at line 70 of file OOLogStub.m.

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

References kOOLogSubclassResponsibility, and OOLog.

◆ OOLogIndent()

void OOLogIndent ( void )

Definition at line 30 of file OOLogStub.m.

30{ }

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 31 of file OOLogStub.m.

31{ }

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 33 of file OOLogStub.m.

33{ }

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 32 of file OOLogStub.m.

32{ }

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 25 of file OOLogStub.m.

26{
27 return YES;
28}

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(), 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 OOLogWithFunctionFileAndLine ( NSString * inMessageClass,
const char * inFunction,
const char * inFile,
unsigned long inLine,
NSString * inFormat,
... )

Definition at line 48 of file OOLogStub.m.

49{
50 va_list args;
51 va_start(args, inFormat);
52 OOLogWithFunctionFileAndLineAndArguments(inMessageClass, inFunction, inFile, inLine, inFormat, args);
53 va_end(args);
54}
void OOLogWithFunctionFileAndLineAndArguments(NSString *inMessageClass, const char *inFunction, const char *inFile, unsigned long inLine, NSString *inFormat, va_list inArguments)
Definition OOLogStub.m:35

References OOLogWithFunctionFileAndLineAndArguments().

Here is the call graph for this function:

◆ OOLogWithFunctionFileAndLineAndArguments()

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

Definition at line 35 of file OOLogStub.m.

36{
37 NSString* message = [[[NSString alloc] initWithFormat:inFormat arguments:inArguments] autorelease];
38 NSString* line = [NSString stringWithFormat:@"[%@]: %@", inMessageClass, message];
39
41 sRecordedMessages = [[NSMutableArray alloc] init];
42 [sRecordedMessages addObject:line];
43
44 fprintf(stdout, "%s\n", [line UTF8String]);
45 fflush(stdout);
46}
static NSMutableArray * sRecordedMessages
Definition OOLogStub.m:13
return nil

References nil, and sRecordedMessages.

Referenced by OOLogWithFunctionFileAndLine(), and OOLogWithPrefix().

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,
... )

Definition at line 56 of file OOLogStub.m.

57{
58 va_list args;
59 va_start(args, inFormat);
60 NSString* format = [inPrefix stringByAppendingString:inFormat];
61 OOLogWithFunctionFileAndLineAndArguments(inMessageClass, inFunction, inFile, inLine, format, args);
62 va_end(args);
63}

References OOLogWithFunctionFileAndLineAndArguments().

Here is the call graph for this function:

◆ OOPocClearRecordedLogMessages()

void OOPocClearRecordedLogMessages ( void )

Definition at line 20 of file OOLogStub.m.

21{
22 [sRecordedMessages removeAllObjects];
23}

Referenced by RunErrorTests(), and RunTimeLimiterTests().

Here is the caller graph for this function:

◆ OOPocRecordedLogMessages()

NSArray * OOPocRecordedLogMessages ( void )

Definition at line 15 of file OOLogStub.m.

16{
17 return sRecordedMessages;
18}

References sRecordedMessages.

Referenced by LogContains().

Here is the caller graph for this function:

Variable Documentation

◆ kOOLogAllocationFailure

NSString* const kOOLogAllocationFailure = @"general.error.allocationFailure"

◆ kOOLogDeprecatedMethod

NSString* const kOOLogDeprecatedMethod = @"general.error.deprecatedMethod"

Definition at line 77 of file OOLogStub.m.

◆ kOOLogException

◆ kOOLogFileNotFound

◆ kOOLogFileNotLoaded

NSString* const kOOLogFileNotLoaded = @"files.notLoaded"

Definition at line 82 of file OOLogStub.m.

◆ kOOLogInconsistentState

◆ kOOLogOpenGLError

NSString* const kOOLogOpenGLError = @"rendering.opengl.error"

Definition at line 83 of file OOLogStub.m.

Referenced by OOCheckOpenGLErrors().

◆ kOOLogParameterError

◆ kOOLogSubclassResponsibility

NSString* const kOOLogSubclassResponsibility = @"general.error.subclassResponsibility"

◆ kOOLogUnconvertedNSLog

NSString* const kOOLogUnconvertedNSLog = @"unclassified"

Definition at line 84 of file OOLogStub.m.

◆ sRecordedMessages

NSMutableArray* sRecordedMessages
static