Skip to content

Commit

Permalink
LDEV-4752 - add support for json message in jsonLayout
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Nov 16, 2023
1 parent 8f1fec6 commit 84a7830
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,6 @@ public String toSerializable(final LogEvent event) {
root.setEL("thread", th);
}

// page context
PageContext pc = ThreadLocalPageContext.get();
if (pc != null) {
root.setEL("pageContextId", pc.getId());
if (pc instanceof PageContextImpl) {
root.setEL("requestId", ((PageContextImpl) pc).getRequestId());
}
}

if (this.locationInfo) {
StackTraceElement data = null;
for (StackTraceElement ste: Thread.currentThread().getStackTrace()) {
Expand Down Expand Up @@ -286,6 +277,11 @@ public String toSerializable(final LogEvent event) {
}
else user = remoteUser.getUsername();
if (!Util.isEmpty(user, true)) root.setEL("authUser", user);

root.setEL("pageContextId", pc.getId());
if (pc instanceof PageContextImpl) {
root.setEL("requestId", ((PageContextImpl) pc).getRequestId());
}
}

// env var
Expand Down

0 comments on commit 84a7830

Please sign in to comment.