Re: rbtools: How can I supress the INFO messages?
Thanks. I saw that but I couldn't figure out how to change the logging level. Having my script do this didn't work: logging.basicConfig(level=logging.ERROR) Nor did this: logger = logging.getLogger() logger.setLevel(logging.ERROR) However, this worked: logging.disable(logging.INFO) I don't know enough about logging to know it that's the preferred method, but it gets the job done :) --Steve On Saturday, May 9, 2015 at 8:22:37 PM UTC-7, David Trowbridge wrote: I suggest looking at the init_logging method in rbtools/commands/__init__.py -David On Sat, May 9, 2015 at 2:47 AM Steve seide...@gmail.com javascript: wrote: This is a problem of my own creation, but hopefully someone can help me out. I'm essentially wrapping the functionality provided by the rbt suite of commands with an in-house script. What I'm doing is processing the input args, performing specific tasks that we need, and then eventually passing the rest on via run_from_argv(). For example, to create new review, the code distills down to this: from rbtools.commands import post p = post.Post() p.run_from_argv(args) This works fine, except that the logging messages from Post are now being printed to the console: $ myrbt post 821 .INFO:root:Generating diff for pending changeset 821 Generating diff for pending changeset 821 Review request #9 posted. I am hopelessly lost when it comes to using python logging, but I know that rbt suppress these message and I can't figure out how. Can someone nudge me in the right direction? Thanks! --Steve -- Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/ Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/ Happy user? Let us know! https://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups reviewboard group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/ Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/ Happy user? Let us know! https://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups reviewboard group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: rbtools: How can I supress the INFO messages?
I suggest looking at the init_logging method in rbtools/commands/__init__.py -David On Sat, May 9, 2015 at 2:47 AM Steve seide.al...@gmail.com wrote: This is a problem of my own creation, but hopefully someone can help me out. I'm essentially wrapping the functionality provided by the rbt suite of commands with an in-house script. What I'm doing is processing the input args, performing specific tasks that we need, and then eventually passing the rest on via run_from_argv(). For example, to create new review, the code distills down to this: from rbtools.commands import post p = post.Post() p.run_from_argv(args) This works fine, except that the logging messages from Post are now being printed to the console: $ myrbt post 821 .INFO:root:Generating diff for pending changeset 821 Generating diff for pending changeset 821 Review request #9 posted. I am hopelessly lost when it comes to using python logging, but I know that rbt suppress these message and I can't figure out how. Can someone nudge me in the right direction? Thanks! --Steve -- Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/ Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/ Happy user? Let us know! https://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups reviewboard group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/ Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/ Happy user? Let us know! https://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups reviewboard group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
rbtools: How can I supress the INFO messages?
This is a problem of my own creation, but hopefully someone can help me out. I'm essentially wrapping the functionality provided by the rbt suite of commands with an in-house script. What I'm doing is processing the input args, performing specific tasks that we need, and then eventually passing the rest on via run_from_argv(). For example, to create new review, the code distills down to this: from rbtools.commands import post p = post.Post() p.run_from_argv(args) This works fine, except that the logging messages from Post are now being printed to the console: $ myrbt post 821 .INFO:root:Generating diff for pending changeset 821 Generating diff for pending changeset 821 Review request #9 posted. I am hopelessly lost when it comes to using python logging, but I know that rbt suppress these message and I can't figure out how. Can someone nudge me in the right direction? Thanks! --Steve -- Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/ Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/ Happy user? Let us know! https://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups reviewboard group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.