How to parse the wrapper logs which contains timestamp value at each line

You could use a multiline codec on an input.

 codec => multiline { pattern => "^(|[^\|]+\|[^\|]+\|[^\|]+\|)     " negate => false what => previous auto_flush_interval => 2 }

That assumes lines in the stack trace have multiple spaces, although I would expect them to have a tab. Note that the log level through date are optional, so the third multiline message runs from " Unable to resolve root" at 16:35:31 through "... 12 more".

You can strip out the log level through timestamp in the middle of the [message] field using

mutate { gsub => [ "message", "\n[^\|]+\|[^\|]+\|[^\|]+\|", "" ] }

which results in

   "message" => "INFO   | jvm 1    | 2023/01/18 16:35:31 | org.apache.felix.resolver.reason.ReasonException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity missing requirement ]       at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)       at org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:392)       at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:378)       at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:332)       at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:257)       at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:401)       at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1063)       at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998)       at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n         at java.base/java.lang.Thread.run(Thread.java:834)\n        Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve : missing requirement [] osgi.identity;       osgi.identity=camel-http4; type=karaf.feature\n     at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)\n     ... 12 more",