GitBucket
4.21.2
Toggle navigation
Snippets
Sign in
Files
Branches
1
Releases
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
mark.george
/
jooby-sse
Browse code
Add logger
master
1 parent
ff10e94
commit
3daed14a86249333de6c4f8d528d3ec9cb09f1aa
Mark George
authored
on 5 May 2021
Patch
Showing
2 changed files
build.gradle
src/main/resources/logback.xml
Ignore Space
Show notes
View
build.gradle
plugins { id 'application' } repositories { jcenter() mavenCentral() } dependencies { def joobyVer='2.9.5' implementation group: 'io.jooby', name: 'jooby-netty', version: joobyVer implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3' } task createMissingSourceDirs { group = "Source Directories" description = "Create all of the missing source directories for this project." doFirst { sourceSets.each { def sourceRoot -> sourceRoot.allSource.srcDirTrees.each { def sourceDir -> if(!sourceDir.dir.exists()) { println "Creating ${sourceDir}" mkdir sourceDir.dir } } } } } task deleteEmptySourceDirs { group = "Source Directories" description = "Delete all empty source directories." doFirst { sourceSets.each { def sourceRoot -> sourceRoot.allSource.srcDirTrees.each { def sourceDir -> if(sourceDir.dir.exists() && sourceDir.dir.isDirectory() && sourceDir.dir.list().length == 0) { println "Removing empty ${sourceDir}" sourceDir.dir.delete() } } } } } mainClassName = 'route.Server'
plugins { id 'application' } repositories { jcenter() mavenCentral() } dependencies { def joobyVer='2.9.5' implementation group: 'io.jooby', name: 'jooby-netty', version: joobyVer } task createMissingSourceDirs { group = "Source Directories" description = "Create all of the missing source directories for this project." doFirst { sourceSets.each { def sourceRoot -> sourceRoot.allSource.srcDirTrees.each { def sourceDir -> if(!sourceDir.dir.exists()) { println "Creating ${sourceDir}" mkdir sourceDir.dir } } } } } task deleteEmptySourceDirs { group = "Source Directories" description = "Delete all empty source directories." doFirst { sourceSets.each { def sourceRoot -> sourceRoot.allSource.srcDirTrees.each { def sourceDir -> if(sourceDir.dir.exists() && sourceDir.dir.isDirectory() && sourceDir.dir.list().length == 0) { println "Removing empty ${sourceDir}" sourceDir.dir.delete() } } } } } mainClassName = 'route.Server'
Ignore Space
Show notes
View
src/main/resources/logback.xml
0 → 100644
<!-- logback logging configuration --> <configuration debug="false"> <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator"/> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d{HH:mm:ss} %-5level %logger - %msg%n %ex{full}</pattern> </encoder> <!-- send all except ERROR to stdout --> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>ERROR</level> <onMatch>DENY</onMatch> <onMismatch>ACCEPT</onMismatch> </filter> <target>System.out</target> </appender> <appender name="STDERR" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d{HH:mm:ss} %-5level %logger - %msg%n %ex{full}</pattern> </encoder> <!-- send only ERROR to stderr --> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>ERROR</level> </filter> <target>System.err</target> </appender> <!-- set default logging level --> <root level="info"> <appender-ref ref="STDOUT" /> <appender-ref ref="STDERR" /> </root> </configuration>
Show line notes below