Skip to content

GlobalDBLogHook

Global logging hook.

Declaration

Source position: sqldb.pp line 867

var
  GlobalDBLogHook: TDBLogNotifyEvent = procedure(Sender: TSQLConnection; 
                              EventType: TDBEventType; 
                              const Msg: string) of object;

Description

GlobalDBLogHook can be set in addition to local TSQLConnection.Onlog event handlers. All connections will report events through this global event handler in addition to their OnLog event handlers. The global log event handler can be set only once, so when setting the handler, it is important to set up chaining: saving the previous value, and calling the old handler (if it was set) in the new handler.

See also

Name Description
TSQLConnection.Onlog Event handler for logging events.