I created an logstash input plugin in jruby and when I do an @logger.info("log entry"), I'd like it to have a pipeline.id in the logstash-plain.log as generated by log4j2. Since I have several pipelines it's nice to use the pipeline.id variable. I can configure an id in the configuration input block or use the internal @id, but is the pipeline.id exposed to the plugin and/or log4j2?
This question is a bit similar to
But since I wrote the plugin I can do @logger.info(@id). When I run logstash from the commandline and not as ubuntu service the @id does get printed as "main"