-
Notifications
You must be signed in to change notification settings - Fork 48
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
[performance]: disable logging by default & add logging configuration #151
Conversation
static let workflow = OSLog(subsystem: "com.squareup.Workflow", category: "Workflow") | ||
|
||
/// The active log handle to use when logging. Defaults to the shared `.disabled` handle. | ||
static var active: OSLog = .disabled |
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.
cribbing the analogous Blueprint approach to this
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.
Note: Recently changed this a bit, in particular making this a private (set)
and checking isEnabled
and bailing early from methods: square/Blueprint#364
} | ||
|
||
/// Configuration options used to determine which activities are logged. | ||
public static var config: Config = .debug |
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.
maybe should default to the reduced logging config? 🤷
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 think that seems correct
Background
Changes
example XCTest run after disabling logging:

Checklist