Skip to content

Commit

Permalink
Add default log message (#2245)
Browse files Browse the repository at this point in the history
* Add default log message

* Use n/a
  • Loading branch information
trask authored Apr 22, 2022
1 parent 04ad8d0 commit bbf495e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ private void trackMessage(LogData log) {
setExtraAttributes(telemetryBuilder, attributes);

telemetryBuilder.setSeverityLevel(toSeverityLevel(log.getSeverity()));
telemetryBuilder.setMessage(log.getBody().asString());
String body = log.getBody().asString();
if (body.isEmpty()) {
body = "n/a"; // breeze doesn't accept empty log messages
}
telemetryBuilder.setMessage(body);

// set message-specific properties
setLoggerProperties(
Expand Down

0 comments on commit bbf495e

Please sign in to comment.