These are chat archives for fiji/fiji
And again, you should not instantiate and use your own LogService—that defeats the entire purpose of SciJava dependency injection.
@ctrueden Sure, if my command runs from within Fiji I do not do that — only in case I run standalone (e.g. from Fiji or from an Uber-Jar) I have to create a context and instantiate my own op and log services.
If you use that LogService instead of the default SJC one, you can make SLF4J backed by logback, and configure logback in all the usual ways. The configuration capabilities are extensive: you can log to files, streams, combinations thereof, whatever you want basically, and set up the log messages in whatever format you want, with prefixes, datestamps, etc.
So how would I use log back with the SLF4JLogService? Is there a place I could see this being done?
org.slf4j:slf4j-log4j13depending on the needed version. But otherwise I think what I wrote above is generally accurate.
LogServiceof SJC is enough for you, actually.
new YadaYadaService(...)and use it. Defeats the point of the application context's plugin model. Just ask the context for the service in question, e.g.
context.service(LogService.class). If you need a custom
@Plugin(type = Service.class, priority = Priority.HIGH_PRIORITY)on top of yours and include it on the classpath. If there is some reason doing that is not good enough for your use case, I am very interested in hearing more about it.