CreateLoggingContext

Function CreateLoggingContext(logFile: String, realtime: Boolean, enabled: Boolean=TRUE) :^loggingContexts

logFile: The file that this logging context will write to

realtime: TRUE for realtime logging, FALSE for buffered (see a guide to hlog)

Creates and returns a handle for a new logging context. If the logFile already exists, the logFile is deleted at this point.

Example:

Program
   Uses

       hlog

Var
   verboseLog: ^loggingContexts
   debugLog: ^loggingContexts
   errorLog: ^loggingContexts
   
Begin
   verboseLog = CreateLoggingContext("verbose.log", FALSE)
   debugLog = CreateLoggingContext("debug.log", TRUE)
   errorLog = CreateLoggingContext("error.log", TRUE)
   
   LogMsg(errorLog, "Oh no!")
   
   MessageBox("Done")
End