|
Oolite 1.91.0.7745-260117-205bce7
|
import "OOLogOutputHandler.h"import "OOLogging.h"import "OOAsyncQueue.h"#include <stdlib.h>#include <stdio.h>import "NSThreadOOExtensions.h"import "NSFileManagerOOExtensions.h"#include <SDL.h>#include <dlfcn.h>Go to the source code of this file.
Classes | |
| class | OOAsyncLogger |
Macros | |
| #define | OOLOG_POISON_NSLOG 0 |
| #define | SET_CRASH_REPORTER_INFO 1 |
| #define | kFlushInterval 2.0 |
Typedefs | |
| typedef void(* | LogCStringFunctionProc) (const char *string, unsigned length, BOOL withSyslogBanner) |
| typedef LogCStringFunctionProc(* | LogCStringFunctionGetterProc) (void) |
| typedef void(* | LogCStringFunctionSetterProc) (LogCStringFunctionProc) |
Enumerations | |
| enum | { kConditionReadyToDealloc = 1 , kConditionWorking } |
Functions | |
| static void | InitCrashReporterInfo (void) |
| static void | SetCrashReporterInfo (const char *info) |
| static void | LoadLogCStringFunctions (void) |
| static void | OONSLogCStringFunction (const char *string, unsigned length, BOOL withSyslogBanner) |
| static NSString * | GetAppName (void) |
| static BOOL | DirectoryExistCreatingIfNecessary (NSString *path) |
| void | OOLogOutputHandlerInit (void) |
| void | OOLogOutputHandlerClose (void) |
| void | OOLogOutputHandlerStartLoggingToStdout () |
| void | OOLogOutputHandlerStopLoggingToStdout () |
| void | OOLogOutputHandlerPrint (NSString *string) |
| NSString * | OOLogHandlerGetLogPath (void) |
| void | OOLogOutputHandlerChangeLogFile (NSString *newLogName) |
| static void | ExcludeFromTimeMachine (NSString *path) |
| NSString * | OOLogHandlerGetLogBasePath (void) |
Variables | |
| static BOOL | sCrashReporterInfoAvailable = NO |
| static LogCStringFunctionGetterProc | _NSLogCStringFunction = NULL |
| static LogCStringFunctionSetterProc | _NSSetLogCStringFunction = NULL |
| static LogCStringFunctionProc | sDefaultLogCStringFunction = NULL |
| static BOOL | sInited = NO |
| static BOOL | sWriteToStderr = YES |
| static BOOL | sWriteToStdout = NO |
| static BOOL | sSaturated = NO |
| static OOAsyncLogger * | sLogger = nil |
| static NSString * | sLogFileName = @"@"Latest.log" |
| static char ** | sCrashReporterInfo = NULL |
| static char * | sOldCrashReporterInfo = NULL |
| static NSLock * | sCrashReporterInfoLock = nil |
| #define kFlushInterval 2.0 |
Definition at line 87 of file OOLogOutputHandler.m.
| #define OOLOG_POISON_NSLOG 0 |
Definition at line 30 of file OOLogOutputHandler.m.
| #define SET_CRASH_REPORTER_INFO 1 |
Definition at line 51 of file OOLogOutputHandler.m.
| typedef LogCStringFunctionProc(* LogCStringFunctionGetterProc) (void) |
Definition at line 63 of file OOLogOutputHandler.m.
| typedef void(* LogCStringFunctionProc) (const char *string, unsigned length, BOOL withSyslogBanner) |
Definition at line 62 of file OOLogOutputHandler.m.
| typedef void(* LogCStringFunctionSetterProc) (LogCStringFunctionProc) |
Definition at line 64 of file OOLogOutputHandler.m.
| anonymous enum |
| Enumerator | |
|---|---|
| kConditionReadyToDealloc | |
| kConditionWorking | |
Definition at line 237 of file OOLogOutputHandler.m.
|
static |
Definition at line 550 of file OOLogOutputHandler.m.
Referenced by OOLogHandlerGetLogBasePath().
|
static |
Definition at line 576 of file OOLogOutputHandler.m.
Referenced by OOLogHandlerGetLogBasePath().
|
static |
Definition at line 590 of file OOLogOutputHandler.m.
References nil.
|
static |
Definition at line 663 of file OOLogOutputHandler.m.
References nil, sCrashReporterInfo, sCrashReporterInfoAvailable, and sCrashReporterInfoLock.
Referenced by OOLogOutputHandlerInit().
|
static |
Definition at line 508 of file OOLogOutputHandler.m.
References _NSLogCStringFunction, and _NSSetLogCStringFunction.
Referenced by OOLogOutputHandlerInit().
| NSString * OOLogHandlerGetLogBasePath | ( | void | ) |
Definition at line 608 of file OOLogOutputHandler.m.
References DirectoryExistCreatingIfNecessary(), ExcludeFromTimeMachine(), and nil.
Referenced by ResourceManager::diagnosticFileLocation, OODockTilePlugIn::logFolderPath, and GameController::validateMenuItem:.
| NSString * OOLogHandlerGetLogPath | ( | void | ) |
Definition at line 221 of file OOLogOutputHandler.m.
Referenced by OOAsyncLogger::init, OpenLogFile(), and OOAsyncLogger::startLogging.
| void OOLogOutputHandlerChangeLogFile | ( | NSString * | newLogName | ) |
Definition at line 227 of file OOLogOutputHandler.m.
References OOAsyncLogger::changeFile, and sLogFileName.
Referenced by SwitchLogFile().
| void OOLogOutputHandlerClose | ( | void | ) |
Definition at line 162 of file OOLogOutputHandler.m.
References _NSSetLogCStringFunction, DESTROY, OOAsyncLogger::endLogging, sDefaultLogCStringFunction, sInited, sLogger, and sWriteToStderr.
Referenced by OOLoggingTerminate(), and OOLogOutputHandlerInit().
| void OOLogOutputHandlerInit | ( | void | ) |
Definition at line 120 of file OOLogOutputHandler.m.
References _NSLogCStringFunction, _NSSetLogCStringFunction, InitCrashReporterInfo(), LoadLogCStringFunctions(), nil, OOLog, OOLogOutputHandlerClose(), OONSLogCStringFunction(), sDefaultLogCStringFunction, sInited, sLogger, and sWriteToStderr.
Referenced by OOLoggingInit().
| void OOLogOutputHandlerPrint | ( | NSString * | string | ) |
Definition at line 196 of file OOLogOutputHandler.m.
References OOAsyncLogger::asyncLogMessage:, nil, sCrashReporterInfoAvailable, SetCrashReporterInfo(), sInited, sLogger, sWriteToStderr, and sWriteToStdout.
Referenced by OOLogInsertMarker(), OOLogInternal_(), and OOLogWithFunctionFileAndLineAndArguments().
| void OOLogOutputHandlerStartLoggingToStdout | ( | void | ) |
Definition at line 187 of file OOLogOutputHandler.m.
References sWriteToStdout.
| void OOLogOutputHandlerStopLoggingToStdout | ( | void | ) |
Definition at line 191 of file OOLogOutputHandler.m.
References sWriteToStdout.
|
static |
Definition at line 529 of file OOLogOutputHandler.m.
References OOLogWillDisplayMessagesInClass(), and OOLogWithFunctionFileAndLine().
Referenced by OOLogOutputHandlerInit().
|
static |
Definition at line 680 of file OOLogOutputHandler.m.
References sCrashReporterInfo, sCrashReporterInfoAvailable, and sOldCrashReporterInfo.
Referenced by OOLogOutputHandlerPrint().
|
static |
Definition at line 66 of file OOLogOutputHandler.m.
Referenced by LoadLogCStringFunctions(), and OOLogOutputHandlerInit().
|
static |
Definition at line 67 of file OOLogOutputHandler.m.
Referenced by LoadLogCStringFunctions(), OOLogOutputHandlerClose(), and OOLogOutputHandlerInit().
|
static |
Definition at line 658 of file OOLogOutputHandler.m.
Referenced by InitCrashReporterInfo(), and SetCrashReporterInfo().
|
static |
Definition at line 57 of file OOLogOutputHandler.m.
Referenced by InitCrashReporterInfo(), OOLogOutputHandlerPrint(), and SetCrashReporterInfo().
|
static |
Definition at line 660 of file OOLogOutputHandler.m.
Referenced by InitCrashReporterInfo().
|
static |
Definition at line 74 of file OOLogOutputHandler.m.
Referenced by OOLogOutputHandlerClose(), and OOLogOutputHandlerInit().
|
static |
Definition at line 112 of file OOLogOutputHandler.m.
|
static |
Definition at line 117 of file OOLogOutputHandler.m.
Referenced by OOLogOutputHandlerChangeLogFile().
|
static |
Definition at line 116 of file OOLogOutputHandler.m.
Referenced by OOLogOutputHandlerClose(), OOLogOutputHandlerInit(), and OOLogOutputHandlerPrint().
|
static |
Definition at line 659 of file OOLogOutputHandler.m.
Referenced by SetCrashReporterInfo().
|
static |
Definition at line 115 of file OOLogOutputHandler.m.
Referenced by OOAsyncLogger::asyncLogMessage:, and OOAsyncLogger::loggerThread.
|
static |
Definition at line 113 of file OOLogOutputHandler.m.
Referenced by OOAsyncLogger::changeFile, OOLogOutputHandlerClose(), OOLogOutputHandlerInit(), and OOLogOutputHandlerPrint().
|
static |
Definition at line 114 of file OOLogOutputHandler.m.
Referenced by OOLogOutputHandlerPrint(), OOLogOutputHandlerStartLoggingToStdout(), and OOLogOutputHandlerStopLoggingToStdout().