Enable logging in the plugin ruby script

I wanted to enable logging in my plugin ruby script and added the following line in the register method:

LogStash::Logger.setup_log4j(@logger)

I have the log4j and the slf4j jars in my runtime dependencies. When I try to start logstash, I get an error

The error reported is: 
  missing class name (`org.apache.log4j.LogManager')

Any idea what configuration I am missing?

The jars were not getting packaged because they were not committed into the repo. I am no longer getting this error but the log statements are not printing. Do I need to package the log4j.properties file too?

EDIT: Guess I just had to change the default log level

@logger.level = "DEBUG"

Hi Rishi,

I have same problem. Have you found the solution?

Best regards,

Manh