From 3d689a17eb2f3b208eb59601a03dc11d63face84 Mon Sep 17 00:00:00 2001 From: ciremusyoka Date: Fri, 5 Feb 2021 18:01:30 +0300 Subject: [PATCH] Correct env typo --- .env.sample | 2 +- src/configs/__mocks__/envs.ts | 2 +- src/configs/envs.ts | 4 ++-- src/configs/winston.ts | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.env.sample b/.env.sample index b9e168f..9927208 100644 --- a/.env.sample +++ b/.env.sample @@ -30,4 +30,4 @@ EXPRESS_KEYCLOAK_LOGOUT_URL=https://keycloak-stage.smartregister.org/auth/realms EXPRESS_MAXIMUM_LOGS_FILE_SIZE=5242880 # 5MB EXPRESS_MAXIMUM_LOG_FILES_NUMBER=5 -EXRESS_LOGS_FILE_PATH='/home/.express/reveal-express-server.log +EXPRESS_LOGS_FILE_PATH='/home/.express/reveal-express-server.log diff --git a/src/configs/__mocks__/envs.ts b/src/configs/__mocks__/envs.ts index 952196c..a0f3111 100644 --- a/src/configs/__mocks__/envs.ts +++ b/src/configs/__mocks__/envs.ts @@ -61,4 +61,4 @@ export const EXPRESS_KEYCLOAK_LOGOUT_URL= 'https://keycloak-stage.smartregister. export const EXPRESS_MAXIMUM_LOGS_FILE_SIZE = 5242880; export const EXPRESS_MAXIMUM_LOG_FILES_NUMBER = 5; -export const EXRESS_LOGS_FILE_PATH = '/tmp/logs/reveal-express-server.log'; +export const EXPRESS_LOGS_FILE_PATH = '/tmp/logs/reveal-express-server.log'; diff --git a/src/configs/envs.ts b/src/configs/envs.ts index 98c90a1..428d282 100644 --- a/src/configs/envs.ts +++ b/src/configs/envs.ts @@ -87,5 +87,5 @@ export type EXPRESS_MAXIMUM_LOGS_FILE_SIZE = typeof EXPRESS_MAXIMUM_LOGS_FILE_SI export const EXPRESS_MAXIMUM_LOG_FILES_NUMBER = Number(process.env.EXPRESS_MAXIMUM_LOG_FILES_NUMBER || 5); export type EXPRESS_MAXIMUM_LOG_FILES_NUMBER = typeof EXPRESS_MAXIMUM_LOG_FILES_NUMBER; -export const EXRESS_LOGS_FILE_PATH = process.env.EXRESS_LOGS_FILE_PATH || '/tmp/logs/reveal-express-server.log'; -export type EXRESS_LOGS_FILE_PATH = typeof EXRESS_LOGS_FILE_PATH; +export const EXPRESS_LOGS_FILE_PATH = process.env.EXPRESS_LOGS_FILE_PATH || '/tmp/logs/reveal-express-server.log'; +export type EXPRESS_LOGS_FILE_PATH = typeof EXPRESS_LOGS_FILE_PATH; diff --git a/src/configs/winston.ts b/src/configs/winston.ts index 581a89e..5fc6cba 100644 --- a/src/configs/winston.ts +++ b/src/configs/winston.ts @@ -1,11 +1,11 @@ import * as winston from 'winston'; -import { EXPRESS_MAXIMUM_LOGS_FILE_SIZE, EXPRESS_MAXIMUM_LOG_FILES_NUMBER, EXRESS_LOGS_FILE_PATH } from './envs'; +import { EXPRESS_MAXIMUM_LOGS_FILE_SIZE, EXPRESS_MAXIMUM_LOG_FILES_NUMBER, EXPRESS_LOGS_FILE_PATH } from './envs'; // define the custom settings for each transport (file, console) const options = { file: { level: 'info', - filename: EXRESS_LOGS_FILE_PATH, + filename: EXPRESS_LOGS_FILE_PATH, handleExceptions: true, json: true, maxsize: EXPRESS_MAXIMUM_LOGS_FILE_SIZE,