You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once the LoggingSystem has been bootstrapped, adding a Loggerable to Puppy has no effect. This means it is no longer possible to add and remove loggers to a running system. This was possible in 0.5.0 but is broken in 0.7.0. It may be due to Sendable where the struct is copied when the LogHandler is created. However, the contract to add and remove loggers still exists but has no effect.
The text was updated successfully, but these errors were encountered:
This issue worried me when trying to find a log system suitable for privacy-preserving file log output within an iOS extension.
After working through the integration and seeing it function correctly even after calling bootstrap, I would hazzard a guess that the confusion relates to the Logger instance. Once a Logger has been created, changes to the Puppy handlers have no effect but the next Logger instance created does take on the new configuration.
I've used this approach successfully to enable file output only when a flag is set in UserDefaults. The nature of extensions means I have no "startup" code per-se and thus can only evaluate what the current status should be when iOS invokes my ViewController. That invocation may be on a new instance (process) of my extension or one that has been re-used so there is a common situation where bootstrap has already been called but the desire to log to a file may have changed since last invocation.
Once the LoggingSystem has been bootstrapped, adding a Loggerable to Puppy has no effect. This means it is no longer possible to add and remove loggers to a running system. This was possible in 0.5.0 but is broken in 0.7.0. It may be due to Sendable where the struct is copied when the LogHandler is created. However, the contract to add and remove loggers still exists but has no effect.
The text was updated successfully, but these errors were encountered: