From: Alexandre Terrasa Date: Thu, 11 Jul 2019 02:35:40 +0000 (-0400) Subject: github: Remove old logging X-Git-Url: http://nitlanguage.org github: Remove old logging Signed-off-by: Alexandre Terrasa --- diff --git a/lib/github/api.nit b/lib/github/api.nit index ee62031..bd01519 100644 --- a/lib/github/api.nit +++ b/lib/github/api.nit @@ -91,12 +91,6 @@ class GithubAPI # Default is `https://api.github.com` and should not be changed. var api_url = "https://api.github.com" - # Verbosity level. - # - # * `0`: only errors (default) - # * `1`: verbose - var verbose_lvl = 0 is public writable - # Send a HTTPRequest to the Github API fun send(method, path: String, headers: nullable HeaderMap, body: nullable String): nullable String do last_error = null @@ -143,11 +137,6 @@ class GithubAPI return res end - # Display a message depending on `verbose_lvl`. - fun message(lvl: Int, message: String) do - if lvl <= verbose_lvl then print message - end - # Escape `uri` in an acceptable format for Github. private fun sanitize_uri(uri: String): String do # TODO better URI escape. diff --git a/lib/github/cache.nit b/lib/github/cache.nit index a34bb4e..dbb4ad0 100644 --- a/lib/github/cache.nit +++ b/lib/github/cache.nit @@ -58,7 +58,7 @@ redef class GithubAPI redef fun get(key, headers, data) do if not enable_cache then return super if store.has_key(key) then - message(1, "Get {key} (cache)") + # print "Get {key} (cache)" # debug was_error = false return deserialize(store.load_object(key).to_json) end @@ -71,7 +71,7 @@ redef class GithubAPI # Save `json` data in cache under `key`. private fun cache(key: String, obj: Serializable) do - message(2, "Cache key {key}") + # print "Cache key {key}" # debug store.store_object(key, obj.to_json.parse_json.as(JsonObject)) end