 (defn read-product-name
     "Read name of product for the given product id."
     [product-id]
+    (log/info product-id)
     (read-from-product-table product-id :name))
 
 (defn read-product-description
     "Read description of product for the given product id."
     [product-id]
+    (log/info product-id)
     (read-from-product-table product-id :description))
 
 (defn read-name-for-id
     [table-name id]
+    (log/info table-name id)
     (try
         (-> (jdbc/query db-spec/hurvinek-db
                             [(str "select name from " table-name " where id=?") id])


(defn add-new-component
    [component-name group-id]
    (try
        (jdbc/insert! db-spec/hurvinek-db
                        :components {:name component-name

(defn read-chapter-name
    "Read name of chapter for the given chapter id."
    [chapter-id]
    (log/info chapter-id)
    (read-name-for-id "chapters" chapter-id))

(defn read-group-name
    "Read name of group for the given group id."
    [group-id]
    (log/info group-id)
    (read-name-for-id "groups" group-id))

(defn read-component-name
    "Read name of component for the given component id."
    [component-id]
    (log/info component-id)
    (read-name-for-id "components" component-id))

(defn read-chapters
    "Read list of all chapters for selected product."
    [product-id]
    (log/info product-id)
    (try
        (jdbc/query db-spec/hurvinek-db
                        ["select id, name from chapters where product=? order by name" product-id])
