Version: v1.0.0
log4j Streaming Logwriter
Rundeck, Inc.

Sends Rundeck job output messages to the specified log4j logger.

Sends Rundeck job output messages to the specified log4j logger


This StreamingLogWriter plugin sends job output messages to the specified log4j logger. This is useful if you want to direct the job output messages to a particular destination via an appender (eg, SyslogAppender).


This is a groovy plugin so just copy the .groovy file to $RDECK_BASE/libext.


To enable the plugin, update the file and declare the “rundeck.execution.logs.streamingWriterPlugins” property. If the property already exists use commas to separate each plugin name.



You can name the log4j logger anything you wish. By default, it is named “rundeck”. To override the default name, update the file with the following entry:


You can see the logger was named “my-logger-name”.


Edit rundeck’s to set up the appender you wish to send the log messages.

Here is MDC data available for use in the log4j conversion pattern layouts.

  • username: User that ran the job
  • project: Project name
  • name: the job name
  • group: the job group
  • id: the job ID
  • execid: the execution ID
  • url: The URL to the execution page
  • loglevel: the log event log level

Use the %X format specifier with one of the properties. Eg

 %X{username} %X{project}:%X{group}/%X{name} %X{execid}


Here’s an example that sends messages to syslog. The logger name is the default “rundeck” but change that to whatever you specified earlier.


log4j.rundeck=INFO, SYSLOG
# configure Syslog facility LOCAL1 appender
log4j.appender.SYSLOG.layout.ConversionPattern=%d{ISO8601} %-5p %c{1} - %X{username} %X{project} %X{group}/%X{name} #%X{execid} %X{url} - %m%n

Here’s an example log message using the layout above:

Oct  2 23:18:03 2013-10-02 23: 18:03,150 INFO - rundeck admin anvils nightly_catalog_rebuild #5 - Completed.

If you are running rsyslog on Linux, be sure the rsyslog.conf enabled the udp/tcp input. eg:

# Provides UDP syslog reception
$ModLoad imudp
$UDPServerRun 514

# Provides TCP syslog reception
$ModLoad imtcp
$InputTCPServerRun 514