Skip to content

Commit

Permalink
add some static/temporary logging to see what is going on
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Oct 17, 2024
1 parent 11f954a commit b66a4f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@

import java.io.ByteArrayOutputStream;
import java.util.Locale;
import java.util.Map;
import java.util.TimeZone;
import java.util.concurrent.ConcurrentHashMap;

import lucee.print;
import lucee.commons.io.log.Log;
Expand Down Expand Up @@ -107,6 +109,8 @@ public static Config getConfig() {

}

public static Map<String, Throwable> stacktraces = new ConcurrentHashMap<>();

/**
* release the pagecontext for the current thread
*/
Expand All @@ -116,7 +120,8 @@ public static void release() {
else print.e(Thread.currentThread().getName() + " do release: null");
pcThreadLocal.set(null);
pcThreadLocalInheritable.set(null);
print.ds(Thread.currentThread().getName() + " released");
print.e(Thread.currentThread().getName() + " released");
stacktraces.put(Thread.currentThread().getName(), new Throwable());
}

public static Config getConfig(PageContext pc) {
Expand Down
3 changes: 3 additions & 0 deletions core/src/main/java/lucee/runtime/type/EnvUDF.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ public EnvUDF() {// needed for externalize
}
}
catch (NullPointerException e) {

print.e(Thread.currentThread().getName() + " EnvUDF");
print.e(e);
print.e(ThreadLocalPageContext.stacktraces.get(Thread.currentThread().getName()));
throw e;
}
this.applicationContext = pc.getApplicationContext();
Expand Down

0 comments on commit b66a4f2

Please sign in to comment.