mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-24 06:06:05 +03:00
Log: Improve feature deprecation/removal logs (#3793)
* Improve feature deprecation/removal logs * Add a note about the new feature * When the feature has removed, this should be an error not a warning
This commit is contained in:
parent
1b607ff874
commit
1919a1e86f
@ -18,5 +18,10 @@ type Feature interface {
|
||||
|
||||
// PrintDeprecatedFeatureWarning prints a warning for deprecated feature.
|
||||
func PrintDeprecatedFeatureWarning(feature string) {
|
||||
errors.LogInfo(context.Background(), "You are using a deprecated feature: " + feature + ". Please update your config file with latest configuration format, or update your client software.")
|
||||
errors.LogWarning(context.Background(), "You are using a deprecated feature: " + feature + ". Please update your config file(s) with latest configuration format, or update your client software.")
|
||||
}
|
||||
|
||||
// PrintRemovedFeatureError prints an error message for removed feature. And after long enough time the message can also be removed, use as an indicator.
|
||||
func PrintRemovedFeatureError(feature string) {
|
||||
errors.New("The feature " + feature + " is removed. Please update your config file(s) according to release notes and documentations.")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user