Record Class TelegramBotAppenderProperties
java.lang.Object
java.lang.Record
io.github.yvasyliev.forwarder.telegram.logging.configuration.TelegramBotAppenderProperties
- Record Components:
level- the minimum log level for messages to be sentmaxTextLength- the maximum length of text messages sent to Telegrampattern- the log message pattern to be used
@ConfigurationProperties("logging.telegram-bot-appender")
@Validated
public record TelegramBotAppenderProperties(@NotBlank String level, @NotNull Integer maxTextLength, @NotBlank String pattern)
extends Record
Configuration properties for the Telegram Bot appender.
This class holds the necessary properties to configure the logging appender
that sends log messages to a Telegram bot.
-
Constructor Summary
ConstructorsConstructorDescriptionTelegramBotAppenderProperties(@NotBlank String level, @NotNull Integer maxTextLength, @NotBlank String pattern) Creates an instance of aTelegramBotAppenderPropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotBlank Stringlevel()Returns the value of thelevelrecord component.@NotNull IntegerReturns the value of themaxTextLengthrecord component.@NotBlank Stringpattern()Returns the value of thepatternrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TelegramBotAppenderProperties
public TelegramBotAppenderProperties(@DefaultValue("warn") @NotBlank @NotBlank String level, @DefaultValue("4000") @NotNull @NotNull Integer maxTextLength, @NotBlank @NotBlank String pattern) Creates an instance of aTelegramBotAppenderPropertiesrecord class.- Parameters:
level- the value for thelevelrecord componentmaxTextLength- the value for themaxTextLengthrecord componentpattern- the value for thepatternrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
level
-
maxTextLength
Returns the value of themaxTextLengthrecord component.- Returns:
- the value of the
maxTextLengthrecord component
-
pattern
-