Repository navigation
model.go: use WARNING for "Unexpected folder" messages - #8998
Merged
Merged
Conversation
So, this Syncthing client never complained that it could not sync a certain director^W folder to the Syncthing server. And with INFO messages ignored by monitoring, only logging in to the Syncthing GUI revealed that this new folder needed to be accepted by the server to be synced. As unexpected folder incidents may be uncommon enough, I feel WARNING to be more appropriate here.
Member
|
Agreed on the first one in the diff as I think that's a "can't happen" scenario, or at least indicates something odd or problematic in the setup or timing of changes. This is probably not the one you saw, I think. The second one though is a normal effect of just adding a folder, it'll pop up together with the prompt to add the folder in the gui and that seems excessive. I would rather suggest tweaking your logging rules if this is a thing you depend on, or using the API to manage and verify folder statuses. |
Contributor
Author
|
Understood, thanks for explaining, @calmh! Adjusted the PR as suggested, if I got that right. |
calmh
approved these changes
Jul 22, 2023
calmh
enabled auto-merge (squash)
July 22, 2023 21:06
calmh
added a commit
to calmh/syncthing
that referenced
this pull request
Jul 25, 2023
* main: gui: Remove Twitter link from footer (syncthing#9000) gui, man, authors: Update docs, translations, and contributors lib/ur: Don't report uptime if start time is in the past (fixes syncthing#7698) (syncthing#8996) lib/model: use WARN for "Unexpected folder" messages (syncthing#8998) lib/osutil: Skip setLowPriority in Windows if already lower (fixes syncthing#6597) (syncthing#8993) all: replace empty slice literal with `var` (syncthing#8990) all: fix unused method receiver (syncthing#8988) all: unused parameter should be replaced by underscore (syncthing#8989) gui, man, authors: Update docs, translations, and contributors cmd/syncthing: Mention STVERSIONEXTRA in --help output (ref syncthing#8980) gui, lib/api: Add possibility to feed through extra version information (syncthing#8980) cmd/ursrv: Update map tile URL cmd/strelaypoolsrv: Update map tile URL (syncthing#8985) cmd/stcrashreceiver: Correct parsing of current version string
calmh
added a commit
to calmh/syncthing
that referenced
this pull request
Jul 25, 2023
* main: gui: Remove Twitter link from footer (syncthing#9000) gui, man, authors: Update docs, translations, and contributors lib/ur: Don't report uptime if start time is in the past (fixes syncthing#7698) (syncthing#8996) lib/model: use WARN for "Unexpected folder" messages (syncthing#8998) lib/osutil: Skip setLowPriority in Windows if already lower (fixes syncthing#6597) (syncthing#8993) all: replace empty slice literal with `var` (syncthing#8990) all: fix unused method receiver (syncthing#8988) all: unused parameter should be replaced by underscore (syncthing#8989)
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.
Purpose
Use the WARNING log level for "Unexpected folder" messages.
So, this Syncthing client never complained that it could not sync a certain director^W folder to the Syncthing server. And with INFO messages ignored by monitoring, only logging in to the Syncthing GUI revealed that this new folder needed to be accepted by the server to be synced. As unexpected folder incidents may be uncommon enough, I feel WARNING to be more appropriate here.
Testing
none
Screenshots
n/a
Documentation
n/a
Authorship
Your name and email will be added automatically to the AUTHORS file
based on the commit metadata.