Skip to content

Commit

Permalink
Changed log level from debug to warn, and switched from log4j to logb…
Browse files Browse the repository at this point in the history
…ack/slf4j.
  • Loading branch information
wileyfuller committed Jan 30, 2017
1 parent 5cf8fc0 commit ad2a1e6
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.gradle
build
.idea
classes
10 changes: 7 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,12 @@ dependencies {
compile 'org.springframework:spring-web:4.3.0.RELEASE'

compile 'org.slf4j:slf4j-api:1.7.5'
compile 'org.slf4j:slf4j-log4j12:1.7.5'
// compile 'org.slf4j:jcl-over-slf4j:1.7.5'
compile 'org.slf4j:jul-to-slf4j:1.7.5'
compile 'ch.qos.logback:logback-classic:1.1.3'
compile 'org.slf4j:log4j-over-slf4j:1.7.21'

compile files('lib/b2-logging-utils-1.0.0.jar')


}

Expand All @@ -71,7 +75,7 @@ ant.taskdef(name: 'b2deploy', classname: 'org.oscelot.ant.B2DeployTask', classpa
task deployb2(dependsOn: 'war') << {
println "Deploying \"" + war.archivePath + "\""
ant.b2deploy(localfilepath: war.archivePath,
host: 'bbdev-vm-fh2014:8080',
host: 'localhost:9876',
clean: 'true',
courseorgavailable:'true')
}
Expand Down
Binary file added lib/b2-logging-utils-1.0.0.jar
Binary file not shown.
8 changes: 0 additions & 8 deletions src/main/resources/log4j.properties

This file was deleted.

25 changes: 25 additions & 0 deletions src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>

<define name="pluginLogDir" class="com.alltheducks.logging.logback.BbPluginLogDirPropertyDefiner">
<vendorId>swin</vendorId>
<handle>studentview</handle>
</define>

<appender name="default" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${pluginLogDir}/swin-studentview.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${pluginLogDir}/swin-studentview.%d{yyyy-MM-dd}.log</fileNamePattern>
</rollingPolicy>
<encoder>
<!-- This pattern ensures logging will work in Learn SaaS -->
<pattern>%date{yyyy-MM-dd HH:mm:ss} | %-5level | %-45(%L:%logger{40}) | %m%n%ex{10}</pattern>
</encoder>
</appender>
<logger name="au.edu.swinburne" level="WARN"/>
<logger name="net.sourceforge.stripes" level="WARN"/>
<root level="WARN">
<appender-ref ref="default"/>
</root>
</configuration>
16 changes: 0 additions & 16 deletions src/main/resources/logging.properties

This file was deleted.

6 changes: 5 additions & 1 deletion src/main/webapp/WEB-INF/bb-manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<description value="ssv.plugin.description"/>
<default-locale value="en_GB" />
<webapp-type value="javaext" />
<version value="1.3.5"/>
<version value="1.3.6"/>
<requires>
<bbversion value="9.1"/>
</requires>
Expand Down Expand Up @@ -52,6 +52,10 @@
<permission type="java.lang.RuntimePermission" name="accessDeclaredMembers" />
<permission type="java.lang.reflect.ReflectPermission" name="suppressAccessChecks" />

<!-- Logging Permissions -->
<permission type="java.io.FilePermission" name="BB_HOME/logs/plugins/-"
actions="write"/>

<!-- Other Permissions -->
<permission type="java.lang.RuntimePermission" name="injectRenderingHook" />
<permission type="java.lang.RuntimePermission" name="createClassLoader" />
Expand Down

0 comments on commit ad2a1e6

Please sign in to comment.