diff --git a/modules/web/src/com/haulmont/cuba/web/log/AppLog.java b/modules/web/src/com/haulmont/cuba/web/log/AppLog.java index 428d80599a..9096f8c1d2 100644 --- a/modules/web/src/com/haulmont/cuba/web/log/AppLog.java +++ b/modules/web/src/com/haulmont/cuba/web/log/AppLog.java @@ -21,13 +21,20 @@ import java.util.ArrayList; import java.util.LinkedList; import java.util.List; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + public class AppLog { private LinkedList items = new LinkedList(); private int capacity = 100; + private Log log = LogFactory.getLog(AppLog.class); + public void log(LogItem item) { + log.debug(item.getLevel() + ": " + item.getMessage(), item.getThrowable()); + if (items.size() >= capacity) { items.removeLast(); }