 
 (require '[clojure.data.json :as json])
 (require '[clj-http.client   :as http-client])
+
+(defn log
+    [& args]
+    (.println System/out (apply str (interpose \space args))))
 
 (defn get-command 
     [url]


(defn log-operation
    [job-name git-repo branch operation metadata]
    (println "***" operation "***")
    (println "job-name" job-name)
    (println "git-repo" git-repo)
    (println "branch"   branch)
    (println "metadata" metadata))

(defn send-configuration-xml-to-jenkins
    [url config]

                 nil))))

(defn read-file-from-artifact
    [jenkins-url job-name file-name print-stack-trace?]
    (let [url (str (job-name->url jenkins-url job-name) "/lastSuccessfulBuild/artifact/" file-name)]
        (log "*Using the following URL to retrieve file from artifact: " url)
        (try
            (slurp url)
            (catch Exception e
                 (if print-stack-trace?
                     (.printStackTrace e))
                 nil))))

(defn ok-response-structure
