File tree Expand file tree Collapse file tree
java/com/github/stickerifier/stickerify Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package com .github .stickerifier .stickerify .bot ;
22
3- import static com .github .stickerifier .stickerify .logger .StructuredLogger .EXCEPTION_MESSAGE_LOG_KEY ;
43import static com .github .stickerifier .stickerify .logger .StructuredLogger .FILE_ID_VALUE ;
54import static com .github .stickerifier .stickerify .logger .StructuredLogger .FILE_PATH_LOG_KEY ;
65import static com .github .stickerifier .stickerify .logger .StructuredLogger .ORIGINAL_REQUEST_LOG_KEY ;
@@ -88,10 +87,7 @@ public int process(List<Update> updates) {
8887
8988 @ Override
9089 public void onException (TelegramException e ) {
91- LOGGER .at (Level .ERROR )
92- .setCause (e )
93- .addKeyValue (EXCEPTION_MESSAGE_LOG_KEY , e .getMessage ())
94- .log ("An unexpected failure occurred" );
90+ LOGGER .at (Level .ERROR ).setCause (e ).log ("An unexpected failure occurred" );
9591 }
9692
9793 @ Override
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ public record StructuredLogger(Logger logger) {
1515 private static final String REQUEST_DETAILS_LOG_KEY = "request_details" ;
1616 private static final String FILE_ID_LOG_KEY = "file_id" ;
1717 private static final String MIME_TYPE_LOG_KEY = "mime_type" ;
18- public static final String EXCEPTION_MESSAGE_LOG_KEY = "exception_message" ;
1918 public static final String ORIGINAL_REQUEST_LOG_KEY = "original_request" ;
2019 public static final String FILE_PATH_LOG_KEY = "file_path" ;
2120 public static final String STICKER_LOG_KEY = "sticker" ;
Original file line number Diff line number Diff line change 1515 </pattern >
1616 <message />
1717 <keyValuePairs />
18+ <throwableMessage >
19+ <fieldName >exception_message</fieldName >
20+ </throwableMessage >
1821 <stackTrace />
1922 </providers >
2023 </encoder >
You can’t perform that action at this time.
0 commit comments