Plugin specific log files

I'm sure there is something simple I am missing in my probing around various plugins. How do I define my plugin to have an independent log file under .octoprint/logs? The logger defaults to putting everything in the main octoprint.log. I see the cura plugin and some others have their own log files though I couldn't immediately see where that was defined. Thanks.

On mobile, so no line links, but take a look at self._console_logger and how it's being initialized and set up in initialize and on_startup here

@foosel, what's the difference between _console_logger and _logger? The docs don't have anything about _console_logger.

@jneilliii that's because _console_logger is something added by that specific plugin. Take a look at the quoted locations in the code.

self._logger is the general logged injected by the plugin system. self._console_logger here is a custom additional logger created by the plugin used for some specific (more verbose) logging. It could also be called self._wheeeeeeee or self._meerkat. It's just a name the plugin author decided on using here.