| <?xml version="1.0" encoding="UTF-8"?> |
| |
| <!-- |
| * Licensed to the Apache Software Foundation (ASF) under one or more |
| * contributor license agreements. See the NOTICE file distributed with |
| * this work for additional information regarding copyright ownership. |
| * The ASF licenses this file to You under the Apache License, Version 2.0 |
| * (the "License"); you may not use this file except in compliance with |
| * the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| --> |
| |
| <ui:composition template="/main.xhtml" |
| xmlns:tc="http://myfaces.apache.org/tobago/component" |
| xmlns:ui="http://java.sun.com/jsf/facelets" |
| xmlns:demo="http://myfaces.apache.org/tobago/example/demo" |
| xmlns:f="http://java.sun.com/jsf/core" |
| xmlns="http://www.w3.org/1999/xhtml"> |
| <ui:param name="title" value="Logging Info"/> |
| |
| <tc:gridLayout rows="auto auto auto 1fr" rendered="#{serverInfo.enabled}"> |
| |
| <tc:in label="Test Category" value="#{loggingController.testCategory}"/> |
| <tc:button label="Update" action="#{loggingController.update}"/> |
| |
| <tc:separator/> |
| |
| <tc:gridLayout columns="auto 120px auto 1fr"> |
| |
| <tc:label value="JUL" tip="Java Util Logging"/> |
| <tc:selectBooleanCheckbox value="#{loggingController.jul.available}" readonly="true" |
| label="available" labelLayout="skip"/> |
| <tc:button label="Log" tip="Log some stuff in every level" action="#{loggingController.jul.logDemo}" |
| disabled="#{not loggingController.jul.available}"/> |
| <tc:out value="#{loggingController.jul.activeLevels}"/> |
| |
| <tc:label value="SLF4J" tip="Simple Logging Facade"/> |
| <tc:selectBooleanCheckbox value="#{loggingController.slf4j.available}" readonly="true" |
| label="available" labelLayout="skip"/> |
| <tc:button label="Log" tip="Log some stuff in every level" action="#{loggingController.slf4j.logDemo}" |
| disabled="#{not loggingController.slf4j.available}"/> |
| <tc:out value="#{loggingController.slf4j.activeLevels}"/> |
| |
| <tc:label value="LOG4J"/> |
| <tc:selectBooleanCheckbox value="#{loggingController.log4j.available}" readonly="true" |
| label="available" labelLayout="skip"/> |
| <tc:button label="Log" tip="Log some stuff in every level" action="#{loggingController.log4j.logDemo}" |
| disabled="#{not loggingController.log4j.available}"/> |
| <tc:out value="#{loggingController.log4j.activeLevels}"/> |
| |
| <tc:label value="LOG4J2"/> |
| <tc:selectBooleanCheckbox value="#{loggingController.log4j2.available}" readonly="true" |
| label="available" labelLayout="skip"/> |
| <tc:button label="Log" tip="Log some stuff in every level" action="#{loggingController.log4j2.logDemo}" |
| disabled="#{not loggingController.log4j2.available}"/> |
| <tc:out value="#{loggingController.log4j2.activeLevels}"/> |
| |
| <tc:label value="JCL" tip="Commons Logging"/> |
| <tc:selectBooleanCheckbox value="#{loggingController.commonsLogging.available}" readonly="true" |
| label="available" labelLayout="skip"/> |
| <tc:button label="Log" tip="Log some stuff in every level" action="#{loggingController.commonsLogging.logDemo}" |
| disabled="#{not loggingController.commonsLogging.available}"/> |
| <tc:out value="#{loggingController.commonsLogging.activeLevels}"/> |
| </tc:gridLayout> |
| |
| <tc:flowLayout> |
| |
| <h3>This is a test page to check if all logging libraries are working well in the used container.</h3> |
| |
| <ul> |
| <li>Change the category to check different categories and press "update" to see if the category is enabled.</li> |
| <li>Press "Log some stuff in every level" to log in that category.</li> |
| <li>Consult your log file (or anywhere you are logging) to check the result</li> |
| </ul> |
| |
| </tc:flowLayout> |
| </tc:gridLayout> |
| |
| <tc:section label="Logback Status Messages"> |
| <tc:sheet value="#{loggingController.statusList}" var="status" markup="small"> |
| <tc:column label="Date"> |
| <tc:out value="#{demo:logbackDate(status.date)}" labelLayout="skip"> |
| <f:convertDateTime type="both"/> |
| </tc:out> |
| </tc:column> |
| <tc:column label="Level"> |
| <tc:out value="#{demo:logbackLevel(status.level)}" labelLayout="skip"/> |
| </tc:column> |
| <tc:column label="Origin"> |
| <tc:out value="#{status.origin.getClass().simpleName}" tip="#{status.origin.getClass().name}" labelLayout="skip"/> |
| </tc:column> |
| <tc:column label="Message"> |
| <tc:out value="#{status.message}" labelLayout="skip"/> |
| </tc:column> |
| </tc:sheet> |
| </tc:section> |
| |
| </ui:composition> |