Skip to content

Toggling Signpost Enablement After Pipeline Creation #443

@mlarandeau-wayfair

Description

@mlarandeau-wayfair

I'm not sure if this is intentional or not, but currently, signposts for any given pipeline can only be enabled if ImagePipeline.Configuration.isSignpostLoggingEnabled is set to true before a pipeline is created. If the pipeline was created with signposts enabled, then toggling ImagePipeline.Configuration.isSignpostLoggingEnabled on and off also enables and disables the signposts for that pipeline as expected.

This seems to happen because a pipeline's OSLog is set at initialization based on the current setting of ImagePipeline.Configuration.isSignpostLoggingEnabled. When false, log is set to disabled. The internal signpost wrapper functions check ImagePipeline.Configuration.isSignpostLoggingEnabled every time it is called. Therefore, if the supplied log is not disabled, then whether or not the signpost is recorded is dependent on ImagePipeline.Configuration.isSignpostLoggingEnabled. However, if the log is disabled, it doesn't matter what ImagePipeline.Configuration.isSignpostLoggingEnabled is set to, the signpost will never be recorded.

So my question is, can the signpost support be updated so that signpost logging can be turned on or off at any time? We ran into this issue while trying to implement an internal development toggle to allow us to enable or disable signposts without having to rebuild the app.

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementNon-functional change that improves existing functionality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions