Oolite 1.91.0.7645-241119-222d325
|
import "OOLogOutputHandler.h"
import "OOLogging.h"
import "OOAsyncQueue.h"
#include <stdlib.h>
#include <stdio.h>
import "NSThreadOOExtensions.h"
import "NSFileManagerOOExtensions.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 86 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 50 of file OOLogOutputHandler.m.
typedef LogCStringFunctionProc(* LogCStringFunctionGetterProc) (void) |
Definition at line 62 of file OOLogOutputHandler.m.
typedef void(* LogCStringFunctionProc) (const char *string, unsigned length, BOOL withSyslogBanner) |
Definition at line 61 of file OOLogOutputHandler.m.
typedef void(* LogCStringFunctionSetterProc) (LogCStringFunctionProc) |
Definition at line 63 of file OOLogOutputHandler.m.
anonymous enum |
Enumerator | |
---|---|
kConditionReadyToDealloc | |
kConditionWorking |
Definition at line 236 of file OOLogOutputHandler.m.
|
static |
Definition at line 549 of file OOLogOutputHandler.m.
Referenced by OOLogHandlerGetLogBasePath().
|
static |
Definition at line 604 of file OOLogOutputHandler.m.
Referenced by OOLogHandlerGetLogBasePath().
|
static |
Definition at line 619 of file OOLogOutputHandler.m.
References nil.
|
static |
Definition at line 692 of file OOLogOutputHandler.m.
References nil, sCrashReporterInfo, sCrashReporterInfoAvailable, and sCrashReporterInfoLock.
Referenced by OOLogOutputHandlerInit().
|
static |
Definition at line 507 of file OOLogOutputHandler.m.
References _NSLogCStringFunction, and _NSSetLogCStringFunction.
Referenced by OOLogOutputHandlerInit().
NSString * OOLogHandlerGetLogBasePath | ( | void | ) |
Definition at line 579 of file OOLogOutputHandler.m.
References DirectoryExistCreatingIfNecessary(), ExcludeFromTimeMachine(), and nil.
NSString * OOLogHandlerGetLogPath | ( | void | ) |
Definition at line 220 of file OOLogOutputHandler.m.
Referenced by OOOXPVerifier(OOPrivate)::buildDependencyGraph.
void OOLogOutputHandlerChangeLogFile | ( | NSString * | newLogName | ) |
Definition at line 226 of file OOLogOutputHandler.m.
References OOAsyncLogger::changeFile, and sLogFileName.
Referenced by SwitchLogFile().
void OOLogOutputHandlerClose | ( | void | ) |
Definition at line 161 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 119 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 195 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 186 of file OOLogOutputHandler.m.
References sWriteToStdout.
void OOLogOutputHandlerStopLoggingToStdout | ( | void | ) |
Definition at line 190 of file OOLogOutputHandler.m.
References sWriteToStdout.
|
static |
Definition at line 528 of file OOLogOutputHandler.m.
References OOLogWillDisplayMessagesInClass(), and OOLogWithFunctionFileAndLine().
Referenced by OOLogOutputHandlerInit().
|
static |
Definition at line 709 of file OOLogOutputHandler.m.
References sCrashReporterInfo, sCrashReporterInfoAvailable, and sOldCrashReporterInfo.
Referenced by OOLogOutputHandlerPrint().
|
static |
Definition at line 65 of file OOLogOutputHandler.m.
Referenced by LoadLogCStringFunctions(), and OOLogOutputHandlerInit().
|
static |
Definition at line 66 of file OOLogOutputHandler.m.
Referenced by LoadLogCStringFunctions(), OOLogOutputHandlerClose(), and OOLogOutputHandlerInit().
|
static |
Definition at line 687 of file OOLogOutputHandler.m.
Referenced by InitCrashReporterInfo(), and SetCrashReporterInfo().
|
static |
Definition at line 56 of file OOLogOutputHandler.m.
Referenced by InitCrashReporterInfo(), OOLogOutputHandlerPrint(), and SetCrashReporterInfo().
|
static |
Definition at line 689 of file OOLogOutputHandler.m.
Referenced by InitCrashReporterInfo().
|
static |
Definition at line 73 of file OOLogOutputHandler.m.
Referenced by OOLogOutputHandlerClose(), and OOLogOutputHandlerInit().
|
static |
Definition at line 111 of file OOLogOutputHandler.m.
Referenced by OOLogOutputHandlerClose(), OOLogOutputHandlerInit(), and OOLogOutputHandlerPrint().
|
static |
Definition at line 116 of file OOLogOutputHandler.m.
Referenced by OOLogOutputHandlerChangeLogFile().
|
static |
Definition at line 115 of file OOLogOutputHandler.m.
Referenced by OOLogOutputHandlerClose(), OOLogOutputHandlerInit(), and OOLogOutputHandlerPrint().
|
static |
Definition at line 688 of file OOLogOutputHandler.m.
Referenced by SetCrashReporterInfo().
|
static |
Definition at line 114 of file OOLogOutputHandler.m.
|
static |
Definition at line 112 of file OOLogOutputHandler.m.
Referenced by OOLogOutputHandlerClose(), OOLogOutputHandlerInit(), and OOLogOutputHandlerPrint().
|
static |
Definition at line 113 of file OOLogOutputHandler.m.
Referenced by OOLogOutputHandlerPrint(), OOLogOutputHandlerStartLoggingToStdout(), and OOLogOutputHandlerStopLoggingToStdout().