Still writing my ZEOS tutorial after a long pause (:prog2: full time)
I am trying to use a loggingformatter different of the default one , using the function TZLoggingEvent.AsString(LoggingFormatter) . But i d'nt undertand how to do that ?
How and where do i declare this formatter ?
for sure i have a turn around (using procedure ZSQLMonitor1LogTrace event and event values )
Code: Select all
procedure TTransactionForm.ZSQLMonitor1LogTrace(Sender: TObject;
Event: TZLoggingEvent);
var myFormat : String;
begin
myFormat:=Format('%s %s',[FormatDateTime('dd-mm-yy hh:mm:ss', Event.Timestamp),event.msg] );
Memo1.lines.add(myformat);
end;
Code: Select all
procedure TTransactionForm.ZSQLMonitor1LogTrace(Sender: TObject;
Event: TZLoggingEvent);
begin
Memo1.lines.add(Event.asString(myformatter));
end;
Serge