[Gllug] rsyslog time format
Vaidas Jablonskis
jablonskis at gmail.com
Sat Jun 25 21:27:03 UTC 2011
Hi Konrad,
You can create a template and then apply it to a message. For example:
# define a template
$template MySuperAwesomeTimestamps,"$NOW %msg%"
# apply the template
authpriv.*
/var/log/secure;MySuperAwesomeTimestamps
$NOW will generate YYYY-MM-DD. The above syntax might be incorrect as I
cannot remember it off hand, but I hope it gives you an idea.
Thanks,
Vaidas
On 24 June 2011 13:40, Konrad Vrba <konrad.vrba at gmail.com> wrote:
> hello,
> at the moment my rsyslog generates logs with time stamp in the form:
> Jun 24 14:03:33 ............
>
> I would like to change the date format to
> YYYY-MM-DD 14:03:33 ............
>
> In the rsyslog.conf file, I see the option to enable high precision
> timestamps. But this is not what I need. I do not need miliseconds time
> stamps. I need year timestamps
>
> Could sombody please advise how to do this ?
>
> regards,
> konrad
>
> --
> Gllug mailing list - Gllug at gllug.org.uk
> http://lists.gllug.org.uk/mailman/listinfo/gllug
>
>
--
Vaidas Jablonskis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20110625/81940ba2/attachment.html>
-------------- next part --------------
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list