To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.
I followed this guide from this page ThreadLocal Example.
public static void addLog(String s)
if (VMPortal.getInstance() != null && VMPortal.getInstance().getEventBus() != null)
I used ThreadLocal for having a static-like function for adding Strings to a Log window. This works well unless I create a worker-Thread which needs add Strings to the log.
Does someone have a tip how my worker thread could get access to my log (without needing the reference of my Application)?
Use an InheritableThreadLocal.