Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log console output during replay to file #985 #1355

Merged
merged 3 commits into from
Oct 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions libraries/app/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,20 +337,23 @@ void application_impl::startup()
genesis.initial_timestamp -= ( genesis.initial_timestamp.sec_since_epoch()
% genesis.initial_parameters.block_interval );
modified_genesis = true;
std::cerr << "Used genesis timestamp: " << genesis.initial_timestamp.to_iso_string()
<< " (PLEASE RECORD THIS)\n";

ilog(
"Used genesis timestamp: ${timestamp} (PLEASE RECORD THIS)",
("timestamp", genesis.initial_timestamp.to_iso_string())
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\n is not needed in ilog.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in new commit. Thanks !

}
if( _options->count("dbg-init-key") )
{
std::string init_key = _options->at( "dbg-init-key" ).as<string>();
FC_ASSERT( genesis.initial_witness_candidates.size() >= genesis.initial_active_witnesses );
set_dbg_init_key( genesis, init_key );
modified_genesis = true;
std::cerr << "Set init witness key to " << init_key << "\n";
ilog("Set init witness key to ${init_key}", ("init_key", init_key));
}
if( modified_genesis )
{
std::cerr << "WARNING: GENESIS WAS MODIFIED, YOUR CHAIN ID MAY BE DIFFERENT\n";
wlog("WARNING: GENESIS WAS MODIFIED, YOUR CHAIN ID MAY BE DIFFERENT");
genesis_str += "BOGUS";
genesis.initial_chain_id = fc::sha256::hash( genesis_str );
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/fc
Submodule fc updated 1 files
+17 −20 src/log/file_appender.cpp
10 changes: 4 additions & 6 deletions libraries/plugins/witness/witness.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,19 @@ namespace bpo = boost::program_options;

void new_chain_banner( const graphene::chain::database& db )
{
std::cerr << "\n"
ilog("\n"
"********************************\n"
"* *\n"
"* ------- NEW CHAIN ------ *\n"
"* - Welcome to Graphene! - *\n"
"* ------------------------ *\n"
"* *\n"
"********************************\n"
"\n";
"\n");
if( db.get_slot_at_time( fc::time_point::now() ) > 200 )
{
std::cerr << "Your genesis seems to have an old timestamp\n"
"Please consider using the --genesis-timestamp option to give your genesis a recent timestamp\n"
"\n"
;
wlog("Your genesis seems to have an old timestamp");
wlog("Please consider using the --genesis-timestamp option to give your genesis a recent timestamp");
}
}

Expand Down