I tired adding SLF4j 1.7.7 to my pom.xml. Still I see Logger is always loaded from SLF4j1.7.2. Is it because, the runtime already has 1.7.2 so 1.7.7 is not loaded?
So I understand, if SLF4j-log4j12-1.7.7.jar is loaded, the setLevel() method works fine. Is it correct.
Yes, this is correct - for more details look at this bug - Bug 279 – Class org.apache.log4j.Category is missing class setLevel(Level) (it was fixed with 1.7.6) although it adds only setLevel as far as I see.
But as the runtime already has 1.7.2 I am not sure if you can use your own version as there are also many issues reported about using different versions of the api and the slf4j-log4j12. Probably a solution here will be to update the runtime to use the latest version. For this the runtime responsible will have to give a statement.