int tempId = 0; try { ClassLoader cl = Thread.currentThread().getContextClassLoader(); if (cl == null) { cl = ClassLoader.getSystemClassLoader(); } tempId = cl.hashCode(); } catch (Exception e) { tempId = -1; } this.threadContextClassloaderId = tempId;
    public AbstractExtendedLogRecord(final Level level, final String msg) {        super(level, msg);        String tempThreadname = null;        try {            tempThreadname = Thread.currentThread().getName();        } catch (Exception e) {            tempThreadname = String.valueOf(getThreadID());        }        this.threadName = tempThreadname;    }