From 76b2333a6da1a2c74742a096e60cbfe82bc5648f Mon Sep 17 00:00:00 2001
From: esikkala <esko.ikkala@aalto.fi>
Date: Tue, 4 May 2021 17:00:48 +0300
Subject: [PATCH] Update logging

---
 src/server/translations_generator/index.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/server/translations_generator/index.js b/src/server/translations_generator/index.js
index 4b2de329..2aec618b 100644
--- a/src/server/translations_generator/index.js
+++ b/src/server/translations_generator/index.js
@@ -5,6 +5,8 @@ import { readTranslationsFromGoogleSheets } from '../../../src/client/configs/sa
 // import localeEN from '../../client/translations/sampo/localeEN'
 import dotenv from 'dotenv'
 
+console.log(`NODE_ENV: ${process.env.NODE_ENV}`)
+
 dotenv.config()
 
 // Start process with an environment variable named GOOGLE_APPLICATION_CREDENTIALS.
@@ -18,6 +20,8 @@ const sheets = google.sheets({ version: 'v4', auth })
 
 const spreadsheetId = process.env.SHEETS_API_SHEET_ID
 
+console.log(`spreadsheetId: ${process.env.NODE_ENV}`)
+
 // const writeToGoogleSheet = async values => {
 //   try {
 //     const result = await sheets.spreadsheets.values.update({
@@ -42,7 +46,7 @@ const readFromGoogleSheet = async () => {
     })
     return result.data.values
   } catch (error) {
-    console.error(error.errors)
+    console.log(error)
   }
 }
 
-- 
GitLab