stream_level for rocket.launcher logger

14 views
Skip to first unread message

Primer

unread,
Feb 5, 2018, 9:25:58 AM2/5/18
to fireworkflows
Hi, I'm a fairly basic FireWorks user. I import the package in my python code.

Here is my question.

At line 132 in the current rocket.py module:
        l_logger = get_fw_logger('rocket.launcher', l_dir=logdir,stream_level='INFO')
I see that the stream_level value is forced to 'INFO', unlike other calls to get_fw_logger().

Is this intentional?

For my needs, I modified the code as follows, in order to propagate the current LaunchPad's strm_lvl:
        strm_lvl = lp.strm_lvl if lp else 'INFO'
        l_logger
= get_fw_logger('rocket.launcher', l_dir=logdir,stream_level=strm_lvl)
but I wonder if this could have unintended side effects.

Anubhav Jain

unread,
Feb 5, 2018, 1:52:16 PM2/5/18
to Primer, fireworkflows
Hi,

There are certainly no side effects that will happen as a result changing the logging level of the rocket. So, you are safe the way you have it.

I think it is good for the user to be able to control the logging level. The only issue is that the logger for the "launchpad" and the logger for the "rocket.launcher" are different and one might want to control the logging level independently rather than reuse the same level for both. I am thinking maybe we should just put the rocket logging level as a configurable setting in FW_config.yaml. What do you think?

Best,
Anubhav

--
You received this message because you are subscribed to the Google Groups "fireworkflows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fireworkflows+unsubscribe@googlegroups.com.
To post to this group, send email to firewo...@googlegroups.com.
Visit this group at https://groups.google.com/group/fireworkflows.
To view this discussion on the web visit https://groups.google.com/d/msgid/fireworkflows/b6649f7b-bb75-427e-a217-ad22694e3a9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Best,
Anubhav

Primer

unread,
Feb 6, 2018, 5:27:00 AM2/6/18
to fireworkflows
Thank you for your quick feedback.

While not relevant to my current use case, I see how having a different logging level for the launchpad and the individual rockets could be useful, so why not add an optional setting in the FW_config.

Thanks again
Primer



Il giorno lunedì 5 febbraio 2018 19:52:16 UTC+1, ajain ha scritto:
Hi,

There are certainly no side effects that will happen as a result changing the logging level of the rocket. So, you are safe the way you have it.

I think it is good for the user to be able to control the logging level. The only issue is that the logger for the "launchpad" and the logger for the "rocket.launcher" are different and one might want to control the logging level independently rather than reuse the same level for both. I am thinking maybe we should just put the rocket logging level as a configurable setting in FW_config.yaml. What do you think?

Best,
Anubhav
On Mon, Feb 5, 2018 at 6:25 AM, Primer <perenne...@infinito.it> wrote:
Hi, I'm a fairly basic FireWorks user. I import the package in my python code.

Here is my question.

At line 132 in the current rocket.py module:
        l_logger = get_fw_logger('rocket.launcher', l_dir=logdir,stream_level='INFO')
I see that the stream_level value is forced to 'INFO', unlike other calls to get_fw_logger().

Is this intentional?

For my needs, I modified the code as follows, in order to propagate the current LaunchPad's strm_lvl:
        strm_lvl = lp.strm_lvl if lp else 'INFO'
        l_logger
= get_fw_logger('rocket.launcher', l_dir=logdir,stream_level=strm_lvl)
but I wonder if this could have unintended side effects.

--
You received this message because you are subscribed to the Google Groups "fireworkflows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fireworkflow...@googlegroups.com.



--
Best,
Anubhav

Anubhav Jain

unread,
Feb 6, 2018, 1:53:13 PM2/6/18
to Primer, fireworkflows
Ok I just pushed a change to enable that, it will be included in the next release (v1.6.6)

Thanks!
Anubhav

To unsubscribe from this group and stop receiving emails from it, send an email to fireworkflows+unsubscribe@googlegroups.com.

To post to this group, send email to firewo...@googlegroups.com.
Visit this group at https://groups.google.com/group/fireworkflows.

For more options, visit https://groups.google.com/d/optout.



--
Best,
Anubhav
Reply all
Reply to author
Forward
0 new messages