Fix logging on Windows #830

Closed
opened 2025-12-28 17:14:23 +00:00 by sami · 0 comments
Owner

Originally created by @AnnaShaleva on GitHub (Nov 18, 2021).

Problem
Absolute logger paths are not supported by zap logger (https://github.com/uber-go/zap/issues/621, https://github.com/uber-go/zap/pull/624). As example, see the failing test:

2021-11-17T15:46:00.8922873Z === RUN   TestHandleLoggingParams/default
2021-11-17T15:46:00.8923506Z     server_test.go:53: 
2021-11-17T15:46:00.8923992Z         	Error Trace:	server_test.go:53
2021-11-17T15:46:00.8924596Z         	Error:      	Received unexpected error:
2021-11-17T15:46:00.8925814Z         	            	couldn't open sink "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\TestHandleLoggingParams150626778\\001\\file.log": no sink found for scheme "c"
2021-11-17T15:46:00.8927627Z         	Test:       	TestHandleLoggingParams/default
2021-11-17T15:46:00.8928441Z === RUN   TestHandleLoggingParams/debug
2021-11-17T15:46:00.8929062Z     server_test.go:66: 
2021-11-17T15:46:00.8929637Z         	Error Trace:	server_test.go:66
2021-11-17T15:46:00.8930234Z         	Error:      	Received unexpected error:
2021-11-17T15:46:00.8931425Z         	            	couldn't open sink "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\TestHandleLoggingParams150626778\\001\\file.log": no sink found for scheme "c"
2021-11-17T15:46:00.8932684Z         	Test:       	TestHandleLoggingParams/debug
2021-11-17T15:46:00.8933483Z --- FAIL: TestHandleLoggingParams (0.00s)
2021-11-17T15:46:00.8934287Z     --- FAIL: TestHandleLoggingParams/default (0.00s)
2021-11-17T15:46:00.8935271Z     --- FAIL: TestHandleLoggingParams/debug (0.00s)
Originally created by @AnnaShaleva on GitHub (Nov 18, 2021). **Problem** Absolute logger paths are not supported by zap logger (https://github.com/uber-go/zap/issues/621, https://github.com/uber-go/zap/pull/624). As example, see the failing test: ``` 2021-11-17T15:46:00.8922873Z === RUN TestHandleLoggingParams/default 2021-11-17T15:46:00.8923506Z server_test.go:53: 2021-11-17T15:46:00.8923992Z Error Trace: server_test.go:53 2021-11-17T15:46:00.8924596Z Error: Received unexpected error: 2021-11-17T15:46:00.8925814Z couldn't open sink "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\TestHandleLoggingParams150626778\\001\\file.log": no sink found for scheme "c" 2021-11-17T15:46:00.8927627Z Test: TestHandleLoggingParams/default 2021-11-17T15:46:00.8928441Z === RUN TestHandleLoggingParams/debug 2021-11-17T15:46:00.8929062Z server_test.go:66: 2021-11-17T15:46:00.8929637Z Error Trace: server_test.go:66 2021-11-17T15:46:00.8930234Z Error: Received unexpected error: 2021-11-17T15:46:00.8931425Z couldn't open sink "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\TestHandleLoggingParams150626778\\001\\file.log": no sink found for scheme "c" 2021-11-17T15:46:00.8932684Z Test: TestHandleLoggingParams/debug 2021-11-17T15:46:00.8933483Z --- FAIL: TestHandleLoggingParams (0.00s) 2021-11-17T15:46:00.8934287Z --- FAIL: TestHandleLoggingParams/default (0.00s) 2021-11-17T15:46:00.8935271Z --- FAIL: TestHandleLoggingParams/debug (0.00s) ```
sami 2025-12-28 17:14:23 +00:00
  • closed this issue
  • added the
    windows
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neo-go#830
No description provided.