Probably the problem is related to your requirement „to log into Java application“?
How does the Java application log? Where is stdout written to? …
For the Java and Log4j logging you need to define a logging format and appended in the logging framework specific manner, but when the console logging does not work the problem is more related to your expectations where the log output should appear…
java application logs are redirected to log file /var/log/test.log due to configuration in log4j.properties file something like below.
log4j.logger.com.example.snmp=DEBUG, file
Console appender is not enabled.
I tried enabling snmp4j jar logs into /var/log/test.log file by adding below line in log4j.properties file as well.
log4j.logger.org.snmp4j=DEBUG, file
But it didn’t worked.
Please suggest how it can be enabled.