Creates a logger instance using the platform's logger factory
This function retrieves the logger factory from the global Lime platform
object and creates a scoped logger. If the platform factory is not available,
it falls back to the browser console.
The package name is automatically determined from the module's URL on the first
call and cached for all subsequent calls. This ensures consistent logger scopes
across all loggers created from the same module instance.
Returns
A logger instance integrated with the platform or console fallback
Remarks
The console fallback is provided for development scenarios where the full
Lime platform is not available. The console object does not fully implement
the Logger interface but provides compatible logging methods.
Creates a logger instance using the platform's logger factory
This function retrieves the logger factory from the global Lime platform object and creates a scoped logger. If the platform factory is not available, it falls back to the browser console.
The package name is automatically determined from the module's URL on the first call and cached for all subsequent calls. This ensures consistent logger scopes across all loggers created from the same module instance.
Returns
A logger instance integrated with the platform or console fallback
Remarks
The console fallback is provided for development scenarios where the full Lime platform is not available. The console object does not fully implement the Logger interface but provides compatible logging methods.
Example