Plugins logs missing with logstash

18 views
Skip to first unread message

Adrien DEFOSSÉ

unread,
Feb 16, 2023, 8:16:26 AM2/16/23
to go-cd
Hi,

For a better view of our Continuous Integration, we configured our gocd-server logback-include.xml to send logs to our logstash server. Globally, it work well but it seems our plugins (docker elastic swarm, LDAP Authentication, ...) doesn't send their logs. I think it's said in gocd documentation. Is there a way to send them anyway? A configuration to change?

Thank you

Chad Wilson

unread,
Feb 16, 2023, 9:29:36 AM2/16/23
to go...@googlegroups.com
I believe it's possible for plugins that properly use GoCD's logging support (i.e they direct their logs to the GoCD plugin subsystem, rather than using their own logging configuration) by defining configuration in your logback-include.xml like the below.

<logger name="plugin.cd.go.authentication.passwordfile" level="INFO">
<appender-ref ref="MyLogstashAppender}"/>
</logger>

From what I can tell, you'd need to declare one <logger> override per plugin unfortunately, with name="plugin.${pluginId}". The ${pluginId} will be the same as you see in the suffixes for the existing plugin file logs you should have sitting alongside go-server.log.

If this works for you, a suggested edit/PR to https://docs.gocd.org/current/advanced_usage/logging.html to better document it would be much appreciated.

-Chad

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/a3d8b382-0969-4b8b-8af6-f2bf7b9eb156n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages