Repository navigation
lib: Consistently set suture logging - #7202
Merged
Merged
Conversation
acolomb
previously approved these changes
Dec 17, 2020
acolomb
left a comment
Member
There was a problem hiding this comment.
I've seen such messages as well. With these changes, they have indeed vanished. Nice approach :-)
| srv.started = make(chan string) | ||
|
|
||
| sup := suture.New("test", util.Spec()) | ||
| sup := suture.New("test", util.Spec(func(e suture.Event) { l.Debugln(e) })) |
Member
There was a problem hiding this comment.
I think this would be less ugly if we had:
util.SpecWithDebugLogger(l)
util.SpecWithInfoLogger(l)
or
util.SpecWithLogger(l, log.INFO_LEVEL)
AudriusButkevicius
approved these changes
Dec 18, 2020
calmh
added a commit
to calmh/syncthing
that referenced
this pull request
Dec 21, 2020
* main: (27 commits) lib/fs: Correct wrapping order for meaningful log-caller (syncthing#7209) all: Handle errors opening db/creating file-set (ref syncthing#5907) (syncthing#7150) cmd/relaypoolsrv: Allow validation of relay join requests by certificate (fixes syncthing#7196) (syncthing#7217) lib: Close underlying conn in protocol (fixes syncthing#7165) (syncthing#7212) lib/db: Prevent IndexID creation race (syncthing#7211) gui: Reflect change in untrusted in sharing tab (syncthing#7201) lib/db: Remove index ids when dropping folder (syncthing#7200) lib/model: Fix flaky test and add some scanning debug (syncthing#7214) lib: Consistently set suture logging (syncthing#7202) lib/model: Unflake TestIgnoreDeleteUnignore (syncthing#7208) gui: Apply changes to untrusted (ref syncthing#6443) (syncthing#7206) lib/config: Remove deprecated pending entries from config (ref syncthing#6443) (syncthing#7204) all: Store pending devices and folders in database (fixes syncthing#7178) (syncthing#6443) gui, man, authors: Update docs, translations, and contributors gui: Sort folders and devices in advanced config modal (syncthing#7192) model: Actually print folder description in "Overriding" log message gui: version.tags is an array, which is truthy when empty build: Switch to gopsutil's v3 module (syncthing#7191) build: Update notify (fixes syncthing#7076) (syncthing#7189) lib/api: Returns tags in version as list (syncthing#7190) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I got some log lines like this in my testing logs:
The supervisor for local discovery didn't set the suture event (log) hook, thus it got logged to stdout via
log.To prevent that oversight I added an
eventHookargument to ourutil.Specconvenience function.