What is "~[task/:na]" or "~[na:na]" in a Java stack trace?

Alex R :

Java stack traces in AWS Lambda now include some extraneous new stuff at the end of each line:

at com.cth.rets.indexer.App.lambda$0(App.java:53) [task/:na]
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:792) ~[task/:na]
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:776) ~[task/:na]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[task/:na]
at com.cth.rets.indexer.App.lambdaHandler(App.java:47) [task/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_181]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181]
at lambdainternal.EventHandlerLoader$StreamMethodRequestHandler.handleRequest(EventHandlerLoader.java:350) ~[na:na]
at lambdainternal.EventHandlerLoader$2.call(EventHandlerLoader.java:888) ~[na:na]
at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:293) ~[na:na]
at lambdainternal.AWSLambda.<clinit>(AWSLambda.java:64) ~[na:na]
at java.lang.Class.forName0(Native Method) ~[na:1.8.0_181]
at java.lang.Class.forName(Class.java:348) ~[na:1.8.0_181]
at lambdainternal.LambdaRTEntry.main(LambdaRTEntry.java:104) ~[LambdaJavaRTEntry-1.0.jar:na]

What do all the little extra ~[...] things mean?

Grant Foster :

What do all the little extra ~[...] things mean?

Logging frameworks will use the tilde to denote that the class packaging information it displays might or might not be correct.

For example, here's an exerpt from the logback documentation:

when it is unable to guarantee the absolute correctness of the information, then it will prefix the data with a tilde, i.e. the '~' character.

An na to the left of the : means the jar or resource from which the method is being called is unknown and an na to the right of the : means the resource's version is unknown.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=135088&siteId=1
Recommended