Customizing puppet run log format

370 views
Skip to first unread message

Jay

unread,
Dec 16, 2013, 1:16:26 PM12/16/13
to puppet...@googlegroups.com
Hi Friends,

Is there any configuration file.. where I can add / remove log formats of puppet run?
I need timestamp in the log which is currently missing.

Thanks in Advance!

Regards,
Jay

Felix Frank

unread,
Dec 21, 2013, 6:16:04 PM12/21/13
to puppet...@googlegroups.com
Hi,

what platform are you running on? How are the logs stored?

The easiest way to get timestamps is by using syslog. It's quite trivial
to add the appropriate option to puppet.conf.

HTH,
Felix

Jay

unread,
Dec 31, 2013, 6:12:17 AM12/31/13
to puppet...@googlegroups.com
Hi Felix,

Sorry for delay in responding!

Thanks, I am using red hat platform and logs are created as redirected output of console to a file on puppet run.
Once again thanks for your input, Could you please point out a sample to use syslog ?

Regards,
Jay
 

Regards,
Jay



--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/52B62134.7010703%40Alumni.TU-Berlin.de.
For more options, visit https://groups.google.com/groups/opt_out.

Felix Frank

unread,
Dec 31, 2013, 3:22:18 PM12/31/13
to puppet...@googlegroups.com
Hi,

sure. From puppet apply --help
"""
* --logdest:
Where to send messages. Choose between syslog, the console, and a log
file. Defaults to sending messages to the console.
"""

So you can either use --logdest=syslog or add logdest=syslog to the
appropriate sections of puppet.conf.

HTH,
Felix

Harish Narra

unread,
Mar 6, 2018, 8:52:48 PM3/6/18
to Puppet Users
Hi,

I'm using --logdest to direct the logs to an external file. Is there a way to force the timestamp in the logs to be in UTC? Currently the timestamp is in the timezone of the appliance.
Is there a way to specify the time format something like {"yyyy-MM-dd'T'HH:mm:ss.SSSXX","GMT"}?

Thanks,
Harish

Henrik Lindberg

unread,
Mar 7, 2018, 1:32:55 PM3/7/18
to puppet...@googlegroups.com
On 07/03/18 01:31, Harish Narra wrote:
> Hi,
>
> I'm using --logdest to direct the logs to an external file. Is there a
> way to force the timestamp in the logs to be in UTC? Currently the
> timestamp is in the timezone of the appliance.
> Is there a way to specify the time format something
> like {"yyyy-MM-dd'T'HH:mm:ss.SSSXX","GMT"}?
>

Afaik there is no feature that allows you to do that easily.

If we are talking about the timestamp that the log adds for when the
item was logged then it may be possible to do something by writing a new
logdest.

- henrik

> Thanks,
> Harish
>
> On Tuesday, 31 December 2013 13:22:18 UTC-7, Felix Frank wrote:
>
> Hi,
>
> sure. From puppet apply --help
> """
> * --logdest:
>   Where to send messages. Choose between syslog, the console, and a
> log
>   file. Defaults to sending messages to the console.
> """
>
> So you can either use --logdest=syslog or add logdest=syslog to the
> appropriate sections of puppet.conf.
>
> HTH,
> Felix
>
> On 12/31/2013 12:12 PM, Jay wrote:
> > Hi Felix,
> >
> > Sorry for delay in responding!
> >
> > Thanks, I am using red hat platform and logs are created as
> redirected
> > output of console to a file on puppet run.
> > Once again thanks for your input, Could you please point out a
> sample to
> > use syslog ?
> >
> > Regards,
> > Jay
>
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to puppet-users...@googlegroups.com
> <mailto:puppet-users...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/7d2c1751-367e-44f4-b1ab-1c64b4c664f0%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/7d2c1751-367e-44f4-b1ab-1c64b4c664f0%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.


--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

Reply all
Reply to author
Forward
0 new messages