diff options
Diffstat (limited to 'internal/hexailsp')
| -rw-r--r-- | internal/hexailsp/run.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/hexailsp/run.go b/internal/hexailsp/run.go index f0ab404..b7f777b 100644 --- a/internal/hexailsp/run.go +++ b/internal/hexailsp/run.go @@ -37,7 +37,11 @@ func RunWithConfig(logPath string, configPath string, stdin io.Reader, stdout io if err != nil { logger.Fatalf("failed to open log file: %v", err) } - defer f.Close() + defer func() { + if err := f.Close(); err != nil { + logger.Printf("failed to close log file: %v", err) + } + }() logger.SetOutput(f) } logging.Bind(logger) |
