BANG Syslog

Component ID

2077727

Component name

BANG Syslog

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

A direct port of the WordPress plugin of the same name (bang-syslog at WordPress codex). Uses the same semantics and invocation methodologies. Requires the WordPress module in your Drupal install before it can be activated.

$array = array('key' => 'value');
$string = "some string";
do_action('log', 'Prefix', $array, $string);

results in the output in your syslog of fff hostname/path/to/document: Prefix: [key: value], some string

Included is a bash script to read the syslog and colourify the output if SYSLOG_COLOR is set to true in your template.php or settings.php file:

define('SYSLOG_COLORS', true);

invoke as ./log.sh filter_term. This will filter your syslog for the filter_term and output the result to your terminal with colouring if you have specified to use colour output in your code.

Still to be done: Settings UI to allow setting colour output and other items from the admin screen instead of relying on defines.