Jira (BOLT-1325) Send Puppet logging functions to the outputter

18 views
Skip to first unread message

Nick Lewis (JIRA)

unread,
May 20, 2019, 7:11:03 PM5/20/19
to puppe...@googlegroups.com
Nick Lewis created an issue
 
Puppet Task Runner / Improvement BOLT-1325
Send Puppet logging functions to the outputter
Issue Type: Improvement Improvement
Assignee: Unassigned
Created: 2019/05/20 4:10 PM
Priority: Normal Normal
Reporter: Nick Lewis

Currently, the Puppet logging functions (notice, info, etc) call the logger directly. This means the messages are no longer sent to console below warn-level. We should add Bolt-specific versions of these functions that generate "log" events that are handled by the outputter. The human outputter should print the messages to stdout, the json outputter should ignore them, and the logger outputter should forward them to the logger.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Nick Lewis (JIRA)

unread,
May 20, 2019, 7:11:04 PM5/20/19
to puppe...@googlegroups.com
Nick Lewis updated an issue
Change By: Nick Lewis
Sprint: Bolt Ready for Grooming

Lucy Wyman (JIRA)

unread,
May 21, 2019, 12:45:03 PM5/21/19
to puppe...@googlegroups.com
Lucy Wyman updated an issue
Change By: Lucy Wyman
Sprint: Bolt Ready for Grooming Kanban

Nick Lewis (JIRA)

unread,
May 21, 2019, 5:19:02 PM5/21/19
to puppe...@googlegroups.com

Henrik Lindberg (JIRA)

unread,
May 22, 2019, 3:18:02 AM5/22/19
to puppe...@googlegroups.com
Henrik Lindberg commented on Improvement BOLT-1325
 
Re: Send Puppet logging functions to the outputter

Nick Lewis Did you start on this already? Isn't there an issue with the logging functions being all the same and hardwired into Puppet? I would like if there was a general way in puppet to switch the entire logging system to something else - i.e. use a different API.

Nick Lewis (JIRA)

unread,
May 22, 2019, 5:51:03 PM5/22/19
to puppe...@googlegroups.com
Nick Lewis commented on Improvement BOLT-1325

I started looking at it and yes I ran into the issue with their being hardwired. The problem with swapping out the logging system entirely is that we actually want log functions from user content to be handled differently than logging built into puppet. Specifically, if the user calls notice then we want to print that message on stdout, but if Puppet calls notice then we want it to be handled by the logger.

Henrik Lindberg (JIRA)

unread,
May 23, 2019, 7:27:02 AM5/23/19
to puppe...@googlegroups.com

Ah, I have also wanted something that works more like a puts() or print() than logging - i.e. a new function that would print to an "outputter" which would be either a "log as notice" or "stdout writer", "stderr writer" etc. This means users would call print() instead of notice().

Nick Lewis (JIRA)

unread,
May 23, 2019, 1:48:02 PM5/23/19
to puppe...@googlegroups.com
Nick Lewis commented on Improvement BOLT-1325

I agree. We just did a bunch of work to split the concepts of "output" and "logging" in Bolt, and I think this ticket would conflate them again, but this time for users. print() or similar seems much more straightforward.

Nick Lewis (JIRA)

unread,
May 29, 2019, 4:23:03 PM5/29/19
to puppe...@googlegroups.com

Nick Lewis (JIRA)

unread,
May 29, 2019, 4:23:03 PM5/29/19
to puppe...@googlegroups.com
Nick Lewis updated an issue
Change By: Nick Lewis
Release Notes Summary: This introduces a new function {{out::message()}}, which can be used to print a message to the user during a plan.
Reply all
Reply to author
Forward
0 new messages