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 believe this isn't meant to be 'only' during initialization, but 'also' during initialization as a way to improve performance but not be a confusing (and breaking) change.
Consider also allowing logger creation during initialization, but then throw if trying to log during initialization. This enables us to get the JS Object into memory during initialization, and during post-initialization when the log methods is called on the Logger instance, we can do the call to the host to retrieve the logger and log to it.
Note: This would mean that the constructor would not throw if called during initialization with a name that is valid but is not a name of an associated Logger on the Fastly Service. That error would be thrown when the log method is called.
JakeChampion
changed the title
Only allow logger creation during initialization
Allow logger creation during initialization
Apr 5, 2024
Consider only allowing loggers to be allocated during initialization, and throw if
Fastly.getLogger
is called during request handling.The text was updated successfully, but these errors were encountered: