I have seen lot of questions and forums around this but none of them provides a satisfactory answer. I would like to create a separate log file for my plugin which has nothing to do with atlassian-stash.log, where I have complete control over root-logging level (info, debug, warn).
If someone can provide an example code, I can offer a one-way ticket to heaven.
Community moderators have prevented the ability to post new answers.
Thanks again to Charles O'Farrell who guided me to correct solution, here I will outline if someone else wants to do that:
You will find the logs under ${PLUGIN_FOLDER}/target/container/tomcat7x/cargo-stash-home/YOUR.log
Not sure if I can offer the ticket exclusively to you Charles since Carl's changes made my day, nevertheless a touching thanks since it made my life really easy.
I'm OK with an upvote. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Zeeshan,
Is it possible to look at your code that you tried for the following?
https://answers.atlassian.com/questions/188880/how-do-i-control-logging-in-an-atlassian-stash-plugin?page=1
I don't think I've seen anyone else get that working except for Carl. You need to use his StashbotLoggerFactory instead of raw SLF4J loggers. I've just tried it locally and it works fine.
Cheers,
Charles
FYI You don't need any of the log4j stuff, we only use logback.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.