Logging from TeamCity plugins
Hello,
What would be the recommended way to log from a custom TeamCity plugin? I saw different approaches, either using Loggers.SERVER logger (which presumably is only for the teamcity server itself) or a logger returned by Log4J based on the class name.
Thank you!
Horace
Please sign in to leave a comment.
If you need to see your log messages in pre-configured TeamCity logs, use loggers from the Loggers class. If it does not matter which log file will be used or if you prefer to configure your own log4j appender, use your own logging category.
Probably it is simpler to use Loggers because there are already log files configured for most of the cases.
ok, thank you for the answer!
Best Regards,
Horace
Hello!
I'm developing plugin using maven archetypes. Could you please tell, which dependency should I add to find Loggers class?
Is the anser still correct or it is outdated and there should be another solution for newer versions of Teamcity?
Thanks in advance.