From 7da0a7e49215bb30ec0a6ce4df425ff08971908a Mon Sep 17 00:00:00 2001 From: Oleksandr Smirnov Date: Thu, 27 Feb 2025 23:43:15 +0200 Subject: [PATCH] refactor: do not log in file when it dont have to --- .github/workflows/tests.yml | 3 ++- lua/gopher/_utils/log.lua | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7be3adc..2ea949d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,6 +9,8 @@ on: jobs: tests: + env: + GOPHER_LOG_USE_FILE: false strategy: matrix: os: [ubuntu-latest] @@ -43,7 +45,6 @@ jobs: run: | nvim --version task ci:install-deps - echo "$HOME/go/bin" >> $GITHUB_PATH - name: Run Tests run: | diff --git a/lua/gopher/_utils/log.lua b/lua/gopher/_utils/log.lua index c7dccd7..f5f3cb4 100644 --- a/lua/gopher/_utils/log.lua +++ b/lua/gopher/_utils/log.lua @@ -28,7 +28,7 @@ local config = { highlights = true, -- Should write to a file - use_file = true, + use_file = vim.env.GOPHER_LOG_USE_FILE ~= "false", -- Level configuration modes = {