RemoveChildLoggingContext
Function RemoveChildLoggingContext(context: ^loggingContexts, remove: ^loggingContexts) : Boolean
context: A loggingContext created by CreateLoggingContext
remove: A loggingContext created by CreateLoggingContext that is a child of context that you wish to remove
Returns TRUE on success
Example:
Program
Uses
hlog
Var
verboseLog: ^loggingContexts
debugLog: ^loggingContexts
errorLog: ^loggingContexts
i : Integer
Begin
verboseLog = CreateLoggingContext("verbose.log", FALSE)
debugLog = CreateLoggingContext("debug.log", TRUE)
errorLog = CreateLoggingContext("error.log", TRUE)
AddChildLoggingContext(errorLog, debugLog)
AddChildLoggingContext(debugLog, verboseLog)
LogMsg(errorLog, "Error")
LogMsg(debugLog, "Debug")
LogMsg(verboseLog, "Verbose")
RemoveChildLoggingContext(errorLog, debugLog)
LogMsg(errorLog, "Error 2")
LogMsg(debugLog, "Debug 2")
LogMsg(verboseLog, "Verbose 2")
FreeAllLoggingContexts()
End
error.log
4 Error
7 Error 2
debug.log (notice how "Error 2" does not appear)
5 Error
6 Debug
8 Debug 2
verbose.log (notice how "Error 2" does not appear)
6 Error
7 Debug
7 Verbose
9 Debug 2
9 verbose 2