This is an automated email from the ASF dual-hosted git repository.
rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
The following commit(s) were added to refs/heads/master by this push:
new d13aab4696 [FIX] Calendar parsing: be less verbose
d13aab4696 is described below
commit d13aab46968544c2578411754c7b82704df36391
Author: Benoit TELLIER <[email protected]>
AuthorDate: Mon Mar 4 21:43:48 2024 +0100
[FIX] Calendar parsing: be less verbose
- Avoid logging the whole ICS in INFO mode
- Reduce the log level to info
---
.../org/apache/james/transport/mailets/ICalendarParser.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git
a/mailet/icalendar/src/main/java/org/apache/james/transport/mailets/ICalendarParser.java
b/mailet/icalendar/src/main/java/org/apache/james/transport/mailets/ICalendarParser.java
index 35b21fa9ef..e4815da03a 100644
---
a/mailet/icalendar/src/main/java/org/apache/james/transport/mailets/ICalendarParser.java
+++
b/mailet/icalendar/src/main/java/org/apache/james/transport/mailets/ICalendarParser.java
@@ -142,13 +142,17 @@ public class ICalendarParser extends GenericMailet {
ByteArrayInputStream inputStream = new
ByteArrayInputStream(icsContent);
return Stream.of(Pair.of(key, builder.build(inputStream)));
} catch (IOException e) {
- if (LOGGER.isErrorEnabled()) {
- LOGGER.error("Error while reading input: " + new
String(icsContent, StandardCharsets.UTF_8), e);
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("Error while reading calendar input: " + new
String(icsContent, StandardCharsets.UTF_8), e);
+ } else {
+ LOGGER.info("Error while reading calendar input", e);
}
return Stream.of();
} catch (ParserException e) {
- if (LOGGER.isErrorEnabled()) {
- LOGGER.error("Error while parsing ICal object: " + new
String(icsContent, StandardCharsets.UTF_8), e);
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("Error while parsing ICal object: " + new
String(icsContent, StandardCharsets.UTF_8), e);
+ } else {
+ LOGGER.info("Error while parsing ICal object", e);
}
return Stream.of();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]