When I write my logs without adding my substitution I am able to write just fine however since I am building upon a central logging server I need to add the host name from the source log to the existing message that is being processed. I intend of having the substitution be something to this effect.
- - [
with
$HOST [
Where $HOST is the universal macro for a hostname.
When I run the following removes my entire line when I run the substitution. Does anyone have any idea what I am doing wrong with my regex? The docs said that I needed to use [ within single quotes to make this special character a literal.
rewrite r_addhostname{
subst('- - \[', '$HOST \[', value("MESSAGE"));
};
Thanks in advance, Cole