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
I don't think it is possible to construct strings are run-time without allocations. And including a timestamp in a string is such an operation.
I agree with @baumgold that those allocations are unexpected, because it suggests that LoggingExtras.jl works differently than how stdlib Logging.jl works. From the docs1:
it's very cheap to leave debug statements like this in the source code because the system avoids evaluating the message if it would later be ignored
In fact @baumgold 's example shows this: the first @debug does not allocate because it would later be ignored. My expectation would be that adding a TransformerLogger that does nothing shouldn't change this.
A trivial example shows that the
TransformerLogger
allocates even in the simplest case:This uses LoggingExtras v1.0.3 and Julia v1.10.0:
The text was updated successfully, but these errors were encountered: