-
Notifications
You must be signed in to change notification settings - Fork 38
Closed
Labels
api: loggingIssues related to the googleapis/java-logging API.Issues related to the googleapis/java-logging API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
Hello.
I've noticed pretty strange things. Somehow you are adding whole stack trace information to textPayload which is weird. Also it look very ugly in stackdriver logging web UI because you just put there extremely long string that can not be displayed in nice and verbose way.
I think that nobody wants to see it in textPayload. Why you can't add full stacktrace to property/label named "stacktrace" ?
As for textPayload the only one reasonable modification is to add only message from exception at new line
This is part of the code that does all this things
private LogEntry logEntryFor(ILoggingEvent e) {
StringBuilder payload = new StringBuilder(e.getFormattedMessage()).append('\n');
writeStack(e.getThrowableProxy(), "", payload);
Level level = e.getLevel();
LogEntry.Builder builder =
LogEntry.newBuilder(Payload.StringPayload.of(payload.toString().trim()))
.setTimestamp(e.getTimeStamp())
.setSeverity(severityFor(level));
IRus
Metadata
Metadata
Assignees
Labels
api: loggingIssues related to the googleapis/java-logging API.Issues related to the googleapis/java-logging API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.