ntg
ntg

Reputation: 14075

Set io.vertx.core.logging.Logger level and direct to System.out

How can I set the logger level for a class I am interested into and also set it to output to the System.out?

Preferably this will affect only my class...

package mypackageroot.algorithms;
import io.vertx.core.logging.Logger;
import io.vertx.core.logging.LoggerFactory;
.....
public class Myclass {
.....
    protected final Logger logger = LoggerFactory.getLogger(this.getClass());
.....
    public void ping(){
       logger.trace("ping trace");
       logger.error("ping errorLevel");
    }
}

Upvotes: 0

Views: 524

Answers (1)

tsegismont
tsegismont

Reputation: 9128

The Vert.x logging API is deprecated, you shouldn't use it in new applications.

It is not a logging backend, rather a facade to existing tools: jdk logging, log4j, log4j2, slf4j.

Pick one of these tools for your application and use it directly in your code.

Upvotes: 1

Related Questions