Skip to content
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

Add option to configure the verbosity of the logs #217

Merged
merged 3 commits into from
Jul 17, 2019

Conversation

ignazioc
Copy link
Contributor

@ignazioc ignazioc commented Jul 5, 2019

Hi,
The current logs produced by the SDK are pretty verbose. This is great during the debug but during the every day job is too much noise that hides the real important messages.

With this PR I added an option (https://github.com/technology-ebay-de/prebid-mobile-ios/blob/9d723ea3d07800a13c9d3a34382b3e9b567c0825/src/PrebidMobile/PrebidMobile/Prebid.swift#L53) to allow the clients to choose a different LogLevel.

All the logs, are anyway disabled on release builds.

The default of this value is debug to do not change the current behaviour.

For the level of verbosity I reused the existing enum. This enum is sorted based on the verbosity of the log. .debug will print everything, severe only the severe error.

public enum LogLevel: String {
    case debug = "[💬]" // debug
    case verbose = "[🔬]" // verbose
    case info = "[ℹ️]" // info
    case warn = "[⚠️]" // warning
    case error = "[‼️]" // error
    case severe = "[🔥]" // severe
}

@ppuviarasu ppuviarasu merged commit d5ade64 into prebid:master Jul 17, 2019
@bszekely1 bszekely1 added this to the Prebid SDK 1.2 milestone Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants