Spring.Logging.Appenders.Base FormatText not working with Value LogEvents

Issue #307 resolved
Former user created an issue

Hi everybody, is there any reason why the case-switch does not include the TLogEvent.Value?

class function TLogAppenderBase.FormatText(const event: TLogEvent): string;
begin
  case event.EventType of
    TLogEventType.Text,
    TLogEventType.SerializedData,
    TLogEventType.CallStack:
      Result := event.Msg;

    TLogEventType.Entering:
      Result := FormatEntering(event.ClassType, event.Msg);

    TLogEventType.Leaving:
      Result := FormatLeaving(event.ClassType, event.Msg);
  end;
end;

So the TFileLogAppender (for example) doesn't log any value outputs...

Thanks in advance!

BTW: Thanks for the great work! It's an amazing framework ;)

Comments (4)

  1. Stefan Glienke repo owner
    • changed status to open

    Most likely that was an oversight - also missing from the test: TTestLogAppenderBase.TestFormatText.

    I will add the following lines if that looks alright:

        TLogEventType.Value:
          Result := event.Msg + ': ' + event.Data.ToString;
    
  2. Log in to comment