Utility to help avoid logging the same message multiple times.
This is helpful to prevent spamming the logs with sticky error conditions.
For example if local storage cannot be written to, then each attempt to
write would fail, and logging each time would spam the logs.
Parameters
context: string
The context of the message.
logOnceId: string
A message with this ID will only be logged one time for the given context.
Utility to help avoid logging the same message multiple times.
This is helpful to prevent spamming the logs with sticky error conditions. For example if local storage cannot be written to, then each attempt to write would fail, and logging each time would spam the logs.