jlp/resources/main/logback.groovy
Jonathan Bernard bfc0c12127 Hidden files are ignored. Added --version option and logging.
* Added logging with SLF4J and Logback
* Added `--version` option.
* Mofidied the input file rules. When an input object is a directory, JLPMain is
  adding all the files in that directory and its subdirectories. Now JLPMain is
  ignoring hidden files in the directory and subdirs. A file named explicitly on
  the command line is still included regardless of if it is hidden or not.
* Documentation continues.
2011-12-29 10:53:14 -06:00

18 lines
533 B
Groovy

import ch.qos.logback.classic.encoder.PatternLayoutEncoder
import ch.qos.logback.core.ConsoleAppender
import ch.qos.logback.core.FileAppender
import static ch.qos.logback.classic.Level.*
appender("stdout", ConsoleAppender) {
encoder(PatternLayoutEncoder) {
pattern = "%level %msg%n" }}
appender("logfile", FileAppender) {
file = "jlp.log"
encoder(PatternLayoutEncoder) {
pattern = "%date %level %logger{10} [%file:%line] %msg%n" }}
root(WARN, ["stdout"])
//logger("com.jdblabs.jlp", TRACE, ["file"])