Regression test dataset

Tags: #<Tag:0x00007f0f1be2d890>

Yes though not in depth ,let me dig deep into it

Your Logger should be org.slf4j.Logger instead of java.util.logging.Logger, is what i mean by the above link.

@dkayiwa thanks for the clarification…

I have switched to the slf4j logger with this line in my test class

Logger log = LoggerFactory.getLogger(AuditableInterceptor.class.toString());

Also the other bit is that am not able to set the Level while using the slf4j logger ,the reason i think this functionality is missing is that it is next to impossible to construct a Level type for slf4j that can be efficiently mapped to the Level (or equivalent) type used in all of the possible logging implementations behind the facade

Why are you doing toString()? Just do it exactly like i put it. Logger.getLogger(AuditableInterceptor.class).setLevel(Level.INFO)

@dkayiwa i get un-resolved compilation error logger

Even when i put the line inside the test

i get the warning the method getLogger(AuditableInterceptor.class) is undefined for type Logger

Can you commit and i see your change in full context?

1 Like

@dkayiwa here is the commit

Level should be org.apache.log4j.Level instead of java.util.logging.Level

thanks ,i have corrected it

hello @dkayiwa , i did the Level switch to org.apache.log4j.Level as you had recommended, however the compiler was still complaining that thegetLogger method is not defined for this type Logger.

I did some googling and found out that getLogger method is no longer supported for the slf4j.Logger and accordding to this article, Calls to org.apache.log4j.Logger.getLogger() must be modified to org.apache.logging.log4j.LogManager.getLogger().

So i came up with something like this LogManager.getLogger(AuditableInterceptor.class).setLevel(Level.INFO); which fixed the blocker…

Can you commit my change exactly as i suggested it and i see if you did things correctly?

hello @dkayiwa,

this is the commit , i managed to fix it as you requested and it worked

Sorry about the delayed response ,was trying to figure out what is causing the travis failure yet all tests and maven build pass locally.

cc @ibacher

Could not find artifact org.openmrs.module:htmlformentry:pom:3.11.0-SNAPSHOT. Use either version 3.11.0 or 3.12.0-SNAPSHOT

1 Like

i switched to 3.12.0-SNAPSHOT which resolved it issue …thanks

here is my updated pr