Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable annoying PODAM logs

I am using PODAM library to populate my POJOs with some random values and PODAM is spaming my logs. For 1 simple test I have more 6000+ lines in logs. I am only able to turn it off by adding.

EDITED:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
   <logger name="uk.co.jemos.podam.api.PodamFactoryImpl" level="INFO"/>-->
</configuration>

I am just wondering if there is another way how to achieve? Looging.level.root=INFO in application.properties doesnt help and I tried also LogManager.getLogger(PodamFactoryImpl.class).setLevel(LogLevel.OFF)

Many thanks

like image 991
troger19 Avatar asked Oct 27 '25 05:10

troger19


1 Answers

Put this code in your test or in setup() method:

import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.Logger;
import org.slf4j.LoggerFactory;

    @BeforeAll
    static void setup() {
        Logger root = (Logger) LoggerFactory.getLogger("uk.co.jemos.podam.api");
        root.setLevel(Level.OFF);
    }
like image 152
MK-rou Avatar answered Oct 28 '25 18:10

MK-rou



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!