import org.apache.wicket.Component;\r
import org.apache.wicket.markup.html.panel.Panel;\r
import org.apache.wicket.model.Model;\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
\r
import com.gitblit.Constants;\r
import com.gitblit.Keys;\r
\r
private transient TimeUtils timeUtils;\r
\r
+ private transient Logger logger;\r
+\r
public BasePanel(String wicketId) {\r
super(wicketId);\r
}\r
return GitBlitWebApp.get();\r
}\r
\r
+ protected Logger logger() {\r
+ if (logger == null) {\r
+ logger = LoggerFactory.getLogger(getClass());\r
+ }\r
+ return logger;\r
+ }\r
+\r
protected String getContextUrl() {\r
return getRequest().getRelativePathPrefixToContextRoot();\r
}\r
import org.eclipse.jgit.revwalk.RevCommit;\r
import org.eclipse.jgit.treewalk.TreeWalk;\r
import org.eclipse.jgit.treewalk.filter.PathFilterGroup;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
\r
import com.gitblit.Constants;\r
import com.gitblit.Keys;\r
\r
private static final long serialVersionUID = 1L;\r
\r
- private final Logger log = LoggerFactory.getLogger(getClass());\r
-\r
private boolean hasMore;\r
\r
public HistoryPanel(String wicketId, final String repositoryName, final String objectId,\r
// commit missing\r
String msg = MessageFormat.format("Failed to find history of **{0}** *{1}*",\r
path, objectId);\r
- log.error(msg + " " + repositoryName);\r
+ logger().error(msg + " " + repositoryName);\r
add(new Label("commitHeader", MarkdownUtils.transformMarkdown(msg)).setEscapeModelStrings(false));\r
add(new Label("breadcrumbs"));\r
} else {\r