4

enter image description here

How to stop nodeos from generating a message every block? I was trying to do the tutorial and have to have nodeos running in the background but how do I do the tutorial without nodeos showing a message every half second?

  • Command + T will create a new window in terminal, I use that. – John Williamson May 23 '18 at 4:18
  • I used nodeos & and it is still showing me messages – Jacques Whales Jul 24 '18 at 11:27
4

You can run nodeos in the background. (add '&' at the end of command line)

$ nodeos &

And if you don't want to see messages from nodeos, then use following command.

$ nohup nodeos > /dev/null 2>&1 &

|improve this answer|||||
0

Here's the line in producer_plugin.cpp:

   ilog("Produced block ${id}... #${n} @ ${t} signed by ${p} [trxs: ${count}, lib: ${lib}, confirmed: ${confs}]",
        ("p",new_bs->header.producer)("id",fc::variant(new_bs->id).as_string().substr(0,16))
        ("n",new_bs->block_num)("t",new_bs->header.timestamp)
        ("count",new_bs->block->transactions.size())("lib",chain.last_irreversible_block_num())("confs", new_bs->header.confirmed));

If you look at the definition of ilog you'll see that it logs if the logging level is info:

#define ilog( FORMAT, ... ) \
  FC_MULTILINE_MACRO_BEGIN \
   if( (fc::logger::get(DEFAULT_LOGGER)).is_enabled( fc::log_level::info ) ) \
      (fc::logger::get(DEFAULT_LOGGER)).log( FC_LOG_MESSAGE( info, FORMAT, __VA_ARGS__ ) ); \
  FC_MULTILINE_MACRO_END

And so there's probably a way to set the log level to something lower than info. Or, if you're like me, just delete that line and recompile. That's not something I'd do for production, but it's fine if you're running a development node.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.