Uploaded image for project: 'JBoss Log Manager'
  1. JBoss Log Manager
  2. LOGMGR-285

Have way to get the Stacktrace in single in Patternformatter

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Unresolved
    • Major
    • None
    • None
    • None
    • None
    • Undefined

    Description

      When I am trying to use the patternFormtter. with %s%E or %s%e .. 
      I am getting the stacktraces in new lines.
       

      Need a way to replace the new line chars with some other chars.

      in Spring boot logback we can give following 

      %replace(%xException){'\n','\u2028'}%nopex 

      in the formatter, which basically replaces the newline with some other char.. and the stacktrace comes in one line.
       

      /subsystem=logging/console-handler=CONSOLE:write-attribute(name="formatter", value="{\"time\": \"%d{yyyy-MM-dd HH:mm:ss,SSS}\", \"level\": \"%-5p\", \"tenant_id\": \"%X{tenant}\", \"x-request-id\": \"%X{x-request-id}\", \"user-uuid\" : \"%X{user_id}\", \"client_id\": \"%X{client_id}\", \"loggerName\": \"%c\", \"threadName\": \"%t\", \"message\": \"%s%E\"}%n")  
       {"time": "2021-03-31 13:03:01,501", "level": "ERROR", "tenant_id": "", "x-request-id": "37e1131e-b945-4f78-884f-1cee9c6b53f3", "user-uuid" : "90dee27b-4f40-44ce-a93f-35c7a877d1e0", "client_id": "login-app", "loggerName": "com.xyz.keycloak.KeycloakEventListenerProvider", "threadName": "Thread-146", "message": "Failed to send Audit event for: type=LOGIN, realmId=xyz-iam, clientId=login-app, userId=90dee27b-4f40-44ce-a93f-35c7a877d1e0, ipAddress=x.x.x.x, auth_method=openid-connect, response_type=code, redirect_uri=https://xyz.xyz.io/xyz/index.html/oidc/callback, consent=no_consent_required, code_id=01724161-ab30-4748-b19f-8fbacc2ce1fb, username=xyz-admin@xyz.com, response_mode=query: java.net.ConnectException: javax.websocket.DeploymentException: Invalid response code 503
       at com.xyz.keycloak.audit.xyz.initialize(xyz.java:114)
       at com.xyz.keycloak.audit.xyz.postAudit(xyz.java:139)
       at com.xyz.keycloak.KeycloakEventListenerProvider.xyz(KeycloakEventListenerProvider.java:100)
       at com.xyz.keycloak.KeycloakEventListenerProvider.lambda$onEvent$0(KeycloakEventListenerProvider.java:74)
       at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1640)
       at java.lang.Thread.run(Thread.java:748)

      Could you please check if similar feature can be made in jboss .. or is there any other way to achieve this ?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              baitanik.talukder@gmail.com Baitanik Talukder (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: