enonic / app-explorer

Other
1 stars 3 forks source link

Failed crawls should not be logged as ERROR, but WARN or below #922

Closed hjelmevold closed 8 months ago

hjelmevold commented 8 months ago

When crawls fail due to problems on the website that is crawled, this is logged as an ERROR. Since there is no log level more severe than ERROR, this log level should be reserved for problems that break functionality in the application. Less severe problems, in this case unexpected behavior that may require attention, should be logged as WARN.

hjelmevold commented 8 months ago

For example, within 14 seconds the logs can get 2500 occurrences of the following:

2024-02-18 01:00:09,783 ERROR c.e.app.explorer.collector.uptodate - (/tasks/collect/collect.js) Cannot read property "newTopicKey" from undefined
2024-02-18 01:00:09,784 ERROR c.e.app.explorer.collector.uptodate - (/tasks/collect/collect.js) {"topics":"\n    ","name":"#160500","numTopics":"0"}

When the ERROR frequency is this high, this triggers ciritical alarms in our monitoring systems that are meant to catch Level 7 (application layer) attacks.

ComLock commented 8 months ago

c.e.app.explorer.collector.uptodate Are no longer under our control

ComLock commented 8 months ago

Depends on https://github.com/enonic/lib-explorer/pull/309