diff --git a/.gitignore b/.gitignore index cc1a712..16a2fb9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ target/ /.lein-repl-history /.nrepl-port config.yaml +log/logger1.log +log/logger1.log.1 diff --git a/project.clj b/project.clj index 6e84436..927448c 100644 --- a/project.clj +++ b/project.clj @@ -15,6 +15,11 @@ [clj-time "0.15.2"] ;; Parse RSS/Atom feeds [remus "0.2.1"] + [org.slf4j/slf4j-log4j12 "1.7.25"] + [log4j/log4j "1.2.12" :exclusions [javax.mail/mail + javax.jms/jms + com.sun.jmdk/jmxtools + com.sun.jmx/jmxri]] ;; Make RSS/Atom feeds [clj-rss "0.2.7"]] :plugins [;; DEV TOOLS diff --git a/src/log4j.properties b/src/log4j.properties new file mode 100644 index 0000000..f7125ac --- /dev/null +++ b/src/log4j.properties @@ -0,0 +1,12 @@ +log4j.rootLogger=DEBUG, R +#Output to the file, and a new file is generated when the file size reaches the specified size +log4j.appender.R=org.apache.log4j.RollingFileAppender +#Output to the console +#log4j.appender.stdout=org.apache.log4j.ConsoleAppender +#log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.R.File=./log/logger1.log + +log4j.appender.R.MaxBackupIndex=20 + +log4j.appender.R.layout=org.apache.log4j.PatternLayout +log4j.appender.R.layout.ConversionPattern=[%d][%p][%c] %m%n \ No newline at end of file