-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved onboarding flow based on blog spot #27
Conversation
@@ -279,7 +284,12 @@ void UConfigCatSubsystem::Initialize(FSubsystemCollectionBase& Collection) | |||
const UConfigCatSettings* ConfigCatSettings = GetDefault<UConfigCatSettings>(); | |||
if (!ConfigCatSettings || ConfigCatSettings->SdkKey.IsEmpty()) | |||
{ | |||
UE_LOG(LogConfigCat, Warning, TEXT("Empty SdkKey detected. Please set your SdkKey in the Project Settings.")); | |||
if(GEngine) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if(GEngine) | |
if (GEngine) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran the formatter now and uncovered more of these cases, they are now all part of this PR
{ | ||
return true; | ||
} | ||
|
||
UE_LOG(LogConfigCat, Warning, TEXT("Trying to access the ConfigCatClient before initialization or after shutdown.")); | ||
UE_LOG(LogConfigCat, Error, TEXT("Trying to access the ConfigCatClient before initialization or after shutdown.")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please move the error message into a variable to avoid string duplication?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's refactored now into a PrintError
function for both cases.
UE_LOG(LogConfigCat, Warning, TEXT("Empty SdkKey detected. Please set your SdkKey in the Project Settings.")); | ||
if(GEngine) | ||
{ | ||
GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Red, TEXT("ConfigCat SdkKey missing. Please set your SdkKey in the Project Settings.")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please move the error message into a variable to avoid string duplication?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's refactored now into a PrintError
function for both cases.
Describe the purpose of your pull request
ensure
with logs & prints to ensure the process does not hang