OWL2VOWL icon indicating copy to clipboard operation
OWL2VOWL copied to clipboard

how to exclude logger

Open Bertrandbenj opened this issue 7 years ago • 1 comments

when adding the owl2Vowl dependency to my spring boot project, all my log4j logs disappears.

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

so I tried excluding every libraries I found related to logging in my gradle file, even some that are not present in the owl2vowl pom.xml

    compile('org.visualdataweb.vowl.owl2vowl:OWL2VOWL:0.3.1'){
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-log4j2'
        exclude group: 'org.apache.logging.log4j', module: 'log4j-api'
        exclude group: 'org.apache.logging.log4j', module: 'log4j-core'
        exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl'
        exclude group: 'org.slf4j', module: 'slf4j-api'
        exclude group: 'org.slf4j', module: 'jcl-over-slf4j'
        exclude group: 'org.slf4j', module: 'jul-to-slf4j'
        exclude module: "logback-classic"
        exclude module: "log4j"
    }

but I still cant get my logs back, all I can do is comment owl2vowl dependency to get the project to output log messages. its seems like a common logging issue... which I don't know how to solve

how to embed the dependency without breaking my logger? is it me doing it wrong or something with owl2vowl?

regards

Anyway, very nice job on this tool !

Bertrandbenj avatar Mar 31 '19 18:03 Bertrandbenj

Hi, this could have several reasons:

  1. you should maybe try the newest version
  2. the owl2vowl pom file has several profiles ( and here I am not sure which profile will be used for your build)
  3. there are resource files log4j2-spring-file.xml and log4j2-spring.xml they are necessary for the loggers, so there might be two options that cause the error
  4. owl2vowl resources are not copied to you build
  5. owl2vowl resource your logger xml files

However, without a particular example, It becomes hard to troubleshoot. But I hope this provides you with some hints :)

Kind Regards Vitalis

vitalis-wiens avatar Apr 01 '19 14:04 vitalis-wiens