Skip to content
Snippets Groups Projects
Commit 1fd95136 authored by brinn's avatar brinn
Browse files

DB connection logging: show inner and outer service method name when available.

SVN: 27477
parent d31991b3
No related branches found
No related tags found
No related merge requests found
......@@ -199,15 +199,29 @@ class MonitoringPoolingDataSource extends PoolingDataSource
static String tryGetServiceMethodName(StackTraceElement[] stackTrace)
{
String methodName = null;
String innerMethodName = null;
String outerMethodName = null;
for (StackTraceElement e : stackTrace)
{
if (e.getClassName().contains("$Proxy"))
{
methodName = e.getMethodName();
if (innerMethodName == null)
{
innerMethodName = e.getMethodName();
}
outerMethodName = e.getMethodName();
}
}
return methodName;
if (innerMethodName == null)
{
return null;
}
if (innerMethodName.equals(outerMethodName))
{
return outerMethodName;
} else {
return outerMethodName + " / " + innerMethodName;
}
}
static String traceToString(StackTraceElement[] trace)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment