Open randomPoison opened 5 years ago
Actually, this will be harder than it initially seemed. The Logger
type provided by Amethyst doesn't actually implement Log
, rather it internally uses fern for the logging implementation. We'll need to coordinate with the rest of the Amethyst team to come up with a more flexible API that allows us to send log output to both the console and the editor.
For now this is blocked on upstream changes within Amethyst proper. If anyone would like to take ownership over this task and work with the Amethyst team to make the necessary changes, please let me know and I'll provide any help I can!
Currently
EditorLogger
only passes log output to the editor, but doesn't log anything to the local console. It would be good to also be able to pass log output through the regular Amethyst logger in order to be able to still see log output when the editor isn't running. This is especially important currently since no editor front end handles displaying log output well.Amethyst exposes the
Logger
type as the concrete logger implementation, as well as theLoggerConfig
for configuring the logger.EditorLogger
should be updated to take aLoggerConfig
as an optional parameter, and should forward any log output to an internal AmethystLogger
if configured to do so. This can likely take the form of an additional methodEditorLogger::forward_logs(config: LoggerConfig)
.