Closed dfch closed 9 years ago
Unfortunately there seems to be a delay until the graylog-plugin-archetype 1.0.0 is listed in the archetype catalog (http://repo1.maven.org/maven2/archetype-catalog.xml). Version 1.0.0-rc.1 is still referring to an older version of Graylog.
Please verify that the generated plugin skeleton is using Graylog 1.0.0 (org.graylog2:graylog2-plugin:1.0.0
) and not an earlier release candidate.
The change for those helper methods in PluginModule
has been introduced in Graylog2/graylog2-server@18e42b14a7fdd8262211bf01c51b7dfcd712bb40. We recommend using the "simple" helper method PluginModule#addOutput(Class<? extends MessageOutput>)
(and annotating the Factory class accordingly) or Class<T>,Class<? extends MessageOutput.Factory<T>>)
(for providing the Factory class explicitly).
You can force the correct version of the Maven archetype with the following command:
mvn archetype:generate -DarchetypeGroupId=org.graylog -DarchetypeArtifactId=graylog-plugin-archetype -DarchetypeVersion=1.0.0
Thanks for the quick reply! So to recap correctly: installOutput
is deprecated and should not be used.
Then we can close this issue. Thanks again! Ronald
It's not exactly deprecated and won't be removed anytime soon, but it's exposing too much internals that people usually don't want or need to know. I'd recommend using the simpler helper methods whenever possible.
The comments in the plugin archetype for v1.0.0-rc1 (latest release for v1x) suggests to use
addMessageOutput
as you can see here (quoted from archetype):However, when using a factory to instantiate the plugin, this will not work. Instead we have to use
I know this is not a real issue (but maybe lack of documentation), but my questions is actually, which is the correct way to instantiate an output plugin? The riemann output plugin uses the
installOutput
method and has been rebuilt for v1.x.So either the archetype should be updated or it should be better pointed out, what to use in which scenario.
Thanks, Ronald