stream_level for rocket.launcher logger

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.

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 [email protected] 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 [email protected].

To post to this group, send email to [email protected]glegroups.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

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 [email protected] 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 [email protected].

To post to this group, send email to [email protected].

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

Ok I just pushed a change to enable that, it will be included in the next release (v1.6.6)

Thanks!

Anubhav

···

On Tue, Feb 6, 2018 at 2:27 AM, Primer [email protected] wrote:

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 [email protected] 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 [email protected].

To post to this group, send email to [email protected].

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

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 [email protected].

To post to this group, send email to [email protected].

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/13b79fca-2091-4105-be98-e5f65f0eb185%40googlegroups.com.

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

Best,
Anubhav