Skip to content

Commit

Permalink
[broker] ServerCnx: log at warning level when topic not found (apache…
Browse files Browse the repository at this point in the history
…#16225)

### Motivation

In apache#13950, we switched an error log to an info log. @hsaputra requested on Pulsar Slack we use warn level so that alerts still fire in for the case when the topic is not found.

### Modifications

* Replace `info` with `warn` when topic is not found in the `ServerCnx` class.
- [x] `doc-not-needed`

(cherry picked from commit 72e0445)
  • Loading branch information
michaeljmarshall committed Oct 12, 2022
1 parent 9759815 commit 58dfefc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,7 @@ protected void handleProducer(final CommandProducer cmdProducer) {
// Do not print stack traces for expected exceptions
if (cause instanceof NoSuchElementException) {
cause = new TopicNotFoundException("Topic Not Found.");
log.info("[{}] Failed to load topic {}, producerId={}: Topic not found", remoteAddress, topicName,
log.warn("[{}] Failed to load topic {}, producerId={}: Topic not found", remoteAddress, topicName,
producerId);
} else if (!Exceptions.areExceptionsPresentInChain(cause,
ServiceUnitNotReadyException.class, ManagedLedgerException.class)) {
Expand Down

0 comments on commit 58dfefc

Please sign in to comment.