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 class
ErrorLogger.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 void
accept(TelegramException e)
static ErrorLogger.ErrorLoggerBuilder
builder()
-
-
-
Method Detail
-
accept
public void accept(TelegramException e)
- Specified by:
accept
in interfacejava.util.function.Consumer<TelegramException>
-
builder
public static ErrorLogger.ErrorLoggerBuilder builder()
-
-