replace println with log

This commit is contained in:
kagel 2016-09-14 15:55:52 +03:00
parent 781f4b4a49
commit 59a60aa261
2 changed files with 5 additions and 4 deletions

View File

@ -78,7 +78,7 @@
(defn add-webhook (defn add-webhook
[token user repo] [token user repo]
(println "adding webhook") (log/debug "adding webhook")
(repos/create-hook user repo "web" (repos/create-hook user repo "web"
{:url (str (server-address) "/webhook") {:url (str (server-address) "/webhook")
:content_type "json"} :content_type "json"}
@ -88,7 +88,7 @@
(defn remove-webhook (defn remove-webhook
[token user repo hook-id] [token user repo hook-id]
(println "removing webhook") (log/debug "removing webhook")
(repos/delete-hook user repo hook-id (auth-params token))) (repos/delete-hook user repo hook-id (auth-params token)))
(defn github-comment-hash (defn github-comment-hash

View File

@ -8,7 +8,8 @@
[commiteth.db.users :as users] [commiteth.db.users :as users]
[commiteth.db.repositories :as repositories] [commiteth.db.repositories :as repositories]
[commiteth.db.bounties :as bounties] [commiteth.db.bounties :as bounties]
[commiteth.github.core :as github])) [commiteth.github.core :as github]
[clojure.tools.logging :as log]))
(defn access-error [_ _] (defn access-error [_ _]
(unauthorized {:error "unauthorized"})) (unauthorized {:error "unauthorized"}))
@ -75,7 +76,7 @@
(if (:enabled result) (if (:enabled result)
;; @todo: do we really want to make this call at this moment? ;; @todo: do we really want to make this call at this moment?
(let [created-hook (github/add-webhook token login repo)] (let [created-hook (github/add-webhook token login repo)]
(println created-hook) (log/debug "Created webhook:" created-hook)
(github/create-label login repo token) (github/create-label login repo token)
(repositories/update-hook-id repo-id (:id created-hook))) (repositories/update-hook-id repo-id (:id created-hook)))
(github/remove-webhook token login repo (:hook_id result))) (github/remove-webhook token login repo (:hook_id result)))