   ;; (print-task "logging" *opts*)
   (fn middleware [next-handler]
     (fn handler [fileset]
+      (if verbose (util/info (format "Configuring logging for %s\n" (if jul "jul" "log4j"))))
       (let [workspace (boot/tmp-dir!)
             log4j-edn-files (->> fileset
                                  boot/input-files
                                  (boot/by-re [(re-pattern (str log4j-edn "$"))]))
             log4j-edn-f (condp = (count log4j-edn-files)
-                          0 (throw (Exception. (str appengine-edn " file not found")))
+                          0 (throw (Exception. (str log4j-edn " file not found")))
                           1 (first log4j-edn-files)
                           (throw (Exception.
-                                  (str "Only one " appengine-edn " file allowed; found "
+                                  (str "Only one " log4j-edn " file allowed; found "
                                        (count log4j-edn-files)))))
             log4j-cfg (-> (boot/tmp-file log4j-edn-f) slurp read-string)
 
             jul-edn-files (->> fileset
-                                 boot/input-files
-                                 (boot/by-re [(re-pattern (str jul-edn "$"))]))
+                               boot/input-files
+                               (boot/by-re [(re-pattern (str jul-edn "$"))]))
             jul-edn-f (condp = (count jul-edn-files)
-                          0 (throw (Exception. (str appengine-edn " file not found")))
-                          1 (first jul-edn-files)
-                          (throw (Exception.
-                                  (str "Only one " appengine-edn " file allowed; found "
-                                       (count jul-edn-files)))))
+                        0 (throw (Exception. (str jul-edn " file not found")))
+                        1 (first jul-edn-files)
+                        (throw (Exception.
+                                (str "Only one " jul-edn " file allowed; found "
+                                     (count jul-edn-files)))))
             jul-cfg (-> (boot/tmp-file jul-edn-f) slurp read-string)
 
             boot-config-edn-files (->> fileset
                                        boot/input-files
                                        (boot/by-re [(re-pattern (str boot-config-edn "$"))]))
-
-             boot-config-edn-f (condp = (count boot-config-edn-files)
-                                 0 (throw (Exception. (str boot-config-edn " file not found")))
-                                 ;; 0 (do (util/info (str "Creating " boot-config-edn "\n"))
-                                 ;;       (io/file boot-config-edn)) ;; this creates a java.io.File
-                                 1 (first boot-config-edn-files)  ;; this is a boot.tmpdir.TmpFile
-                                 (throw (Exception.
-                                         (str "only one _boot_config.edn file allowed, found "
-                                              (count boot-config-edn-files)))))
-             boot-config-edn-map (if (instance? boot.tmpdir.TmpFile boot-config-edn-f)
-                                   (-> (boot/tmp-file boot-config-edn-f) slurp read-string)
-                                   {})
+            boot-config-edn-f (condp = (count boot-config-edn-files)
+                                0 (throw (Exception. (str boot-config-edn " file not found")))
+                                ;; 0 (do (util/info (str "Creating " boot-config-edn "\n"))
+                                ;;       (io/file boot-config-edn)) ;; this creates a java.io.File
+                                1 (first boot-config-edn-files)  ;; this is a boot.tmpdir.TmpFile
+                                (throw (Exception.
+                                        (str "Only one " boot-config-edn " file allowed, found "
+                                             (count boot-config-edn-files)))))
+            boot-config-edn-map (if (instance? boot.tmpdir.TmpFile boot-config-edn-f)
+                                  (-> (boot/tmp-file boot-config-edn-f) slurp read-string)
+                                  {})
 
             content (stencil/render-file
                      (if jul
-                       "migae/templates/logging.properties.mustache"
-                       "migae/templates/log4j.properties.mustache")
+                       "migae/boot_gae/logging.properties.mustache"
+                       "migae/boot_gae/log4j.properties.mustache")
                      (merge boot-config-edn-map (if jul jul-cfg log4j-cfg)))
 
-            odir (if odir odir
-                     (if jul web-inf-dir classes-dir))
-            ;; (condp = log
-            ;;   :jul web-inf-dir
-            ;;   :log4j classes-dir
-            ;;   nil web-inf-dir
-            ;;   (throw (IllegalArgumentException. (str "Unrecognized :log value: " log)))))
+            odir (if odir odir (if jul web-inf-dir classes-dir))
+
             out-path (if jul "logging.properties" "log4j.properties")
-            #_(condp = log
-                :log4j "log4j.properties"
-                :jul "logging.properties"
-                nil  "logging.properties")
+
             mv-arg {(re-pattern out-path) (str odir "/$1")}
 
             target-middleware identity

         ;;(println "master config: " master-config)
         ;;(println "appengine-config-map 2: " appengine-config-map)
         (let [content (stencil/render-file
                        "migae/templates/xml.appengine-web.mustache"
                        appengine-config-map)]
           ;;(if verbose (println content))
           (if verbose (util/info "Configuring appengine-web.xml\n"))

                     (spit boot-config-edn-out-file boot-config-edn-s))

                   ;; step 2: gen filters
                   (let [gen-filters-content (stencil/render-file "migae/boot_gae/gen-filters.mustache"
                                                                   (assoc filter-configs
                                                                          :gen-filters-ns
                                                                          gen-filters-ns))
