Class Message

  • All Implemented Interfaces:
    IUnknownPropertiesConsumer

    public final class Message
    extends java.lang.Object
    implements IUnknownPropertiesConsumer
    A log entry message.

    A log message is similar to the `message` attribute on the event itself but can additionally hold optional parameters.

    ```json { "message": { "message": "My raw message with interpreted strings like %s", "params": ["this"] } } ```

    ```json { "message": { "message": "My raw message with interpreted strings like {foo}", "params": {"foo": "this"} } } ```

    • Constructor Summary

      Constructors 
      Constructor Description
      Message()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void acceptUnknownProperties​(@NotNull java.util.Map<java.lang.String,​java.lang.Object> unknown)  
      @Nullable java.lang.String getFormatted()  
      @Nullable java.lang.String getMessage()  
      @Nullable java.util.List<java.lang.String> getParams()  
      void setFormatted​(@Nullable java.lang.String formatted)
      Sets a formatted String
      void setMessage​(@Nullable java.lang.String message)  
      void setParams​(@Nullable java.util.List<java.lang.String> params)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Message

        public Message()
    • Method Detail

      • getFormatted

        @Nullable
        public @Nullable java.lang.String getFormatted()
      • setFormatted

        public void setFormatted​(@Nullable
                                 @Nullable java.lang.String formatted)
        Sets a formatted String
        Parameters:
        formatted - a formatted String
      • getMessage

        @Nullable
        public @Nullable java.lang.String getMessage()
      • setMessage

        public void setMessage​(@Nullable
                               @Nullable java.lang.String message)
      • getParams

        @Nullable
        public @Nullable java.util.List<java.lang.String> getParams()
      • setParams

        public void setParams​(@Nullable
                              @Nullable java.util.List<java.lang.String> params)