Search code examples
javaloggingslf4jopenejbapache-commons-logging

How to make OpenEJB to use slf4j?


Can anyone give an example of pom.xml dependencies configuration that will make OpenEJB to use slf4j logging, instead of JCL (this is what it uses now, as I understand).

see also How to configure OpenEJB logging?


Solution

  • This is how I made OpenEJB to use external logging:

    [...]
    @Before
    public void before() throws Exception {
      System.setProperty("openejb.logger.external", "true");
      InitialContext ctx = new InitialContext();
    }
    [...]
    

    Maybe it's possible to move this system property to some global resource, like pom.xml?