Skip to content

Commit 23eca14

Browse files
committed
Improved log levels for WebDAV access.
1 parent ff73d14 commit 23eca14

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

src/org/opencms/webdav/CmsDavResource.java

+16-3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
import org.opencms.file.CmsResource;
3131
import org.opencms.file.CmsVfsResourceNotFoundException;
32+
import org.opencms.i18n.CmsMessageContainer;
3233
import org.opencms.main.CmsException;
3334
import org.opencms.main.CmsLog;
3435
import org.opencms.repository.CmsPropertyName;
@@ -666,10 +667,22 @@ private I_CmsRepositoryItem getItem() {
666667
m_item = Optional.of(item);
667668

668669
} catch (Exception e) {
669-
if (!(e instanceof CmsVfsResourceNotFoundException)) {
670-
LOG.error(e.getLocalizedMessage(), e);
671-
} else {
670+
boolean isFiltered = false;
671+
if (e instanceof CmsException) {
672+
CmsMessageContainer messageContainer = ((CmsException)e).getMessageContainer();
673+
if (messageContainer != null) {
674+
String messageKey = messageContainer.getKey();
675+
if (org.opencms.repository.Messages.ERR_ITEM_FILTERED_1.equals(messageKey)) {
676+
isFiltered = true;
677+
}
678+
}
679+
}
680+
if (e instanceof CmsVfsResourceNotFoundException) {
672681
LOG.info(e.getLocalizedMessage(), e);
682+
} else if (isFiltered) {
683+
LOG.warn(e.getLocalizedMessage(), e);
684+
} else {
685+
LOG.error(e.getLocalizedMessage(), e);
673686
}
674687
m_item = Optional.empty();
675688

0 commit comments

Comments
 (0)