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
Initialize Swiz with TraceTarget as the only logging target
Elsewhere in my app, after some initialization/stage updates, I add a TextAreaTarget [custom] through a loggingTargets.push(...).
Results:
TraceTarget is only target to get the traces
Fix:
Instead of using push(), reassign the loggingTargets to a new array.
swiz.loggingTargets = [newTargetHere];
This has a downside of keeping the old target as well as the new one though. For this instance, I don't care but I could see where I might want to get rid of an old target but that doesn't seem to be happening.
Expected Results:
When I reset loggingTargets to a new array, I expect all old loggingTargets to be removed.
Notes:
I am aware of SwizLogger.addLoggingTarget(...). This is more about removing targets, which doesn't seem possible.
The text was updated successfully, but these errors were encountered:
Steps:
Results:
Fix:
Instead of using push(), reassign the loggingTargets to a new array.
swiz.loggingTargets = [newTargetHere];
This has a downside of keeping the old target as well as the new one though. For this instance, I don't care but I could see where I might want to get rid of an old target but that doesn't seem to be happening.
Expected Results:
When I reset loggingTargets to a new array, I expect all old loggingTargets to be removed.
Notes:
I am aware of SwizLogger.addLoggingTarget(...). This is more about removing targets, which doesn't seem possible.
The text was updated successfully, but these errors were encountered: