class SimpleProcessLogger implements ComponentLog {

    @Override
    public void error(String msg, Throwable t) {
        if (!isErrorEnabled()) {
            return;
        }

        msg = "{} " + msg;
        Object[] os = t == null ? new Object[]{component} : new Object[]{component, t.toString()};
        logger.error(msg, os);
        if (t != null){
            logger.error("", t);
            logRepository.addLogMessage(LogLevel.ERROR, msg, os, t);
        } else {
            logRepository.addLogMessage(LogLevel.ERROR, msg, os);
        }
    }

    public  SimpleProcessLogger(final String componentId, final Object component);

}