Skip to content

Commit

Permalink
Added Web Logger Configurer from https://github.com/la-team/light-log…
Browse files Browse the repository at this point in the history
  • Loading branch information
max-dev committed Sep 13, 2014
1 parent d515c1d commit e21d07e
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lightadmin-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
<comments>
Copyright 2010-2014 the original author or authors.
Copyright 2012-2014 the original author or authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@
$(function () {
$.ajaxSetup({ cache: false });
$("#support-ukraine").click(function() {
document.location.href = "http://wings-phoenix.org.ua/en/donate-instructions";
});
$("a.not-implemented").click(function () {
jAlert('Sorry mate, but this feature is not yet implemented.', 'Coming soon...');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
</div>

<div class="userNav">
<img id="support-ukraine" style="height: 20px;position: relative;top: 8px;left: 25px; cursor: pointer;" title="Support Ukraine" src="<light:url value='/images/ukraine-peace.png'/>">
<iframe allowtransparency="true" frameborder="0" scrolling="no"
src="https://platform.twitter.com/widgets/tweet_button.html?lang=en&url=http%3A%2F%2Flightadmin.org&related=lightadm_team&text=%23LightAdmin%20-%20Pluggable%20%23CRUD%20administration%20UI%20library%20for%20%23SpringBoot%20on%20top%20of%20%23SpringData,%20%23JPA%20and%20%23REST"
style="width:130px; height:20px; position: relative; right: -35px; top: 8px;"></iframe>
Expand Down
8 changes: 8 additions & 0 deletions lightadmin-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
<spring.version>4.1.0.RELEASE</spring.version>
<hibernate.version>4.3.6.Final</hibernate.version>
<logback.version>1.1.2</logback.version>

<lightadmin.version>1.0.1.BUILD-SNAPSHOT</lightadmin.version>
<light-logging-configurer.version>1.0.0.BUILD-SNAPSHOT</light-logging-configurer.version>

<hibernate-jpa-2.1-api.version>1.0.0.Final</hibernate-jpa-2.1-api.version>
<hibernate-validator.version>5.0.3.Final</hibernate-validator.version>
<validation-api.version>1.1.0.Final</validation-api.version>
Expand All @@ -39,6 +42,11 @@
<artifactId>lightadmin</artifactId>
<version>${lightadmin.version}</version>
</dependency>
<dependency>
<groupId>org.lightadmin</groupId>
<artifactId>light-logging-configurer</artifactId>
<version>${light-logging-configurer.version}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
Expand Down
30 changes: 18 additions & 12 deletions lightadmin-demo/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>

<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<charset>utf-8</charset>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>

<logger name="org.lightadmin.core" level="info" />
<logger name="org.lightadmin.demo" level="info" />
<appender name="MessageSendingAppender" class="org.lightadmin.logging.configurer.logback.MessageSendingAppender"/>

<logger name="org.springframework" level="warn" />
<logger name="org.lightadmin.core" level="info"/>
<logger name="org.lightadmin.demo" level="info"/>

<logger name="org.hibernate" level="warn" />
<logger name="org.springframework" level="warn"/>

<root level="warn">
<appender-ref ref="console" />
</root>
<logger name="org.hibernate" level="warn"/>

<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
<resetJUL>true</resetJUL>
</contextListener>

<root level="WARN">
<appender-ref ref="MessageSendingAppender"/>
</root>

</configuration>
10 changes: 10 additions & 0 deletions lightadmin-demo/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@

<description>LightAdmin - Administration framework for Java web applications. [DEMO]</description>

<context-param>
<param-name>light:configurer:base-url</param-name>
<param-value>/logger</param-value>
</context-param>

<context-param>
<param-name>light:configurer:back-to-site-url</param-name>
<param-value>http://lightadmin.org</param-value>
</context-param>

<context-param>
<param-name>light:administration:base-url</param-name>
<param-value>/admin</param-value>
Expand Down

0 comments on commit e21d07e

Please sign in to comment.