Menu

#24 EnableSilenceMode turns off all output

closed-wont-fix
nobody
None
5
2012-02-26
2012-02-26
Korval
No

EnableSilenceMode is supposed to stop the WikiBot framework from writing things to the console. And it does. However, it stops *all* writes to the console, whether WikiBot's or my own. That's not what this behavior should be doing.

Similarly, EnableLogging should enable logging to a file. It should not cause all of the *user's* stuff to go to a file too.

It is wrong for the WikiBot framework to assume that it has exclusive ownership of stdout and stderr.

Discussion

  • CodeDriller

    CodeDriller - 2012-02-26
    • status: open --> closed-wont-fix
     
  • CodeDriller

    CodeDriller - 2012-02-26

    This behaviour is intentional, it's not a bug. You are right that it would be better to switch output, but EnableSilenceMode() is just a tiny little function intended to keep the screen clean in the absence of errors to ease keeping eye on long operations, it's not intended for custom redesign of bot's output.

     
  • Korval

    Korval - 2012-02-26

    If EnableSilenceMode isn't intended to be able to allow me to print out the messages I want... what is? I want to keep the console clear of DotNetWikiBot's crap, but still be able to display *my* stuff. If EnableSilenceMode isn't for that, what is?

     
  • Korval

    Korval - 2012-02-26
    • status: closed-wont-fix --> open-wont-fix
     
  • CodeDriller

    CodeDriller - 2012-02-26

    When there is a need to edit, say, 10 000 pages, I launch the bot, start watching TV, and I want only the error messages to appear on the screen, not the whole crap. It also works fine in conjunction with EnableLogging() function for overnight operations.

    If you really need to display a couple of your own messages you can switch to silent mode and then back again.

    StreamWriter standardOutput = new StreamWriter(Console.OpenStandardOutput());
    standardOutput.AutoFlush = true;
    ...
    Console.SetOut(standardOutput);

     
  • CodeDriller

    CodeDriller - 2012-02-26
    • status: open-wont-fix --> closed-wont-fix
     

Log in to post a comment.