@Howard: make it static otherwise you can get surprises :p Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau
2014/1/13 Howard W. Smith, Jr. <[email protected]>: > On Sun, Jan 12, 2014 at 11:44 AM, Romain Manni-Bucau > <[email protected]>wrote: > >> Side note: producing a logger is a wrong idea (see codi list to learn >> why) so maybe just get rid of it >> > > +1 > > My SLF4J example below. > > > import org.slf4j.Logger; > import org.slf4j.LoggerFactory; > > @Named("myController") > @SessionScoped > public class MyController implements Serializable { > > private final Logger logger = LoggerFactory.getLogger(getClass()); > > // of course, this is inside some method > try { > ... > } catch (Exception e) { > logger.error("caught exception:", e); > }
