Package com.jtelegram.api.ex.handler
Class ErrorLogger
- java.lang.Object
-
- com.jtelegram.api.ex.handler.ErrorLogger
-
- All Implemented Interfaces:
java.util.function.Consumer<TelegramException>
public class ErrorLogger extends java.lang.Object implements java.util.function.Consumer<TelegramException>
Logs exceptions with no further action. When sensitive is true, sensitive information related to the exception will be printed. The sensitive flag is useful for debugging, but should be set to false in production.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classErrorLogger.ErrorLoggerBuilder
-
Constructor Summary
Constructors Constructor Description ErrorLogger()ErrorLogger(java.lang.String identifier, java.util.logging.Logger logger, boolean sensitive)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(TelegramException e)static ErrorLogger.ErrorLoggerBuilderbuilder()
-
-
-
Method Detail
-
accept
public void accept(TelegramException e)
- Specified by:
acceptin interfacejava.util.function.Consumer<TelegramException>
-
builder
public static ErrorLogger.ErrorLoggerBuilder builder()
-
-