On 12 October 2012 13:12, Anders Hammar <and...@hammar.net> wrote: > > In the context of Maven, is there any added value in pluging having a > > separated logging environment? If there is no added value, then merged > > logging is the way to go. >
Going separate makes it very difficult for the end user to figure out how they are supposed to configure the logging levels. Consider the case of jetty:run. I want to turn down a specific logger in the servlet as it generates a lot of noize, and another one needs turning up to DEBUG to catch the events of interest. If we don't have merged logging I have no clue where to start. With merged logging it is the same place I configure anything for Maven and logging... a usability win from my PoV > Could one possible case be a plugin which embeds some "framework" > which uses slf4j to log to it's own log file(s)? And in this case you > might want to keep the original framework's default logging behavior. > Don't know of such case in reality, but it popped to my mind thinking > about how the Cargo plugin works. It embeds an app server or web > container and that container could be using slf4j already. Currently > Cargo only supports Jetty in embedded mode though, and I don't know if > Jetty uses slf4j or some other logging framework/API. > IIRC jetty will use slf4j if present, otherwise it does its own thing. So if the plugin classloader exposes the slf4j-api then that's where the jetty logs will go. Mind you, for jetty as it currently stands you're still getting the logs routed to the console by default so sending them via the shared slf4j just means that the logs will be consistently formatted... which is a win from my PoV. I think the key thing to do is allow plugins to declare whether they want shared logging or not, and then instantiate the classloader correspondingly. We can do inference based on the presence of a slf4j implementation class as a help, or we can do the simpler thing which is assume they want it shared and let people fix by exception. > If all logging from the embedded framework gets directed to the Maven > output console, it could get messy. I'm thinking something like how > the surefire plugin works where the user is directed to the surefire > reports for further problem info (stacktraces etc.) > those would be the cases where the plugin would indicate that it wants isolated logging. > > Well, just some thoughts. > > /Anders > > > > > > > -- > > Ceki > > 65% of statistics are made up on the spot > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > > For additional commands, e-mail: dev-h...@maven.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > >