From c4d8c36fd6ee3f6f1ffb252bf710657c362de055 Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Fri, 30 Mar 2018 13:33:37 +0200
Subject: [PATCH] logs: log github requests only if non-cached

---
 lib/platform/github/gh-got-wrapper.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/platform/github/gh-got-wrapper.js b/lib/platform/github/gh-got-wrapper.js
index 23f801667f..1ddf004130 100644
--- a/lib/platform/github/gh-got-wrapper.js
+++ b/lib/platform/github/gh-got-wrapper.js
@@ -11,11 +11,11 @@ function sleep(ms) {
 
 async function get(path, opts, retries = 5) {
   const method = opts && opts.method ? opts.method : 'get';
-  logger.debug(`${method.toUpperCase()} ${path} [retries=${retries}]`);
   if (method === 'get' && cache[path]) {
     logger.trace({ path }, 'Returning cached result');
     return cache[path];
   }
+  logger.debug(`${method.toUpperCase()} ${path} [retries=${retries}]`);
   try {
     if (appMode) {
       /* eslint-disable no-param-reassign */
-- 
GitLab