Adding log messages to bitbucket.log / any other file through Bitbucket Plugin


I want to add log messages through my plugin to the bitbucket log (./target/bitbucket/home/log/Atlassian-bitbucket.log) or to any log file specific to my plugin. I looked at the below links, but I couldn’t find a straight-forward way to do it (perhaps bcoz of my lack of exp in developing bitbucket plugins)

I tried using slf4j.Logger but it did not work for me.

From the below link, it seems that I need to create logback.xml. But I couldn’t find enough documents around this.

Can someone point me to an example/documentation as to how it is done?