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)

   // Any error Log entries are also added to the debug log
   AddChildLoggingContext(errorLog, debugLog)
   
   // And debug Log entries are also added to the verbose log
   // This means that any error Log entries are also added to
   // the verbose Log.

   AddChildLoggingContext(debugLog, verboseLog)
   
   LogMsg(errorLog, "Error")
   LogMsg(debugLog, "Debug")
   LogMsg(verboseLog, "Verbose")

   // Now the error Log no longer writes to the debug Log.    
   // This means that any error Log entries are also no longer
   // added to the verbose Log.

   RemoveChildLoggingContext(errorLog, debugLog)

   LogMsg(errorLog, "Error 2")
   LogMsg(debugLog, "Debug 2")
   LogMsg(verboseLog, "Verbose 2")
   
   FreeAllLoggingContexts() // Verbose needs to be committed
   
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