Catch a few more missed logging newlines

Mostly with a space before the trailing newline.
This commit is contained in:
Tommy 2022-07-20 11:05:14 +12:00
parent bd8efdffec
commit c2ab49b887
9 changed files with 18 additions and 18 deletions

View File

@ -151,7 +151,7 @@ void aspect_attacks_base::do_attack_analysis(const map_location& loc,
const std::size_t max_positions = 1000;
if(result.size() > max_positions && !cur_analysis.movements.empty()) {
LOG_AI << "cut analysis short with number of positions\n";
LOG_AI << "cut analysis short with number of positions";
return;
}

View File

@ -226,20 +226,20 @@ void recruitment::execute() {
for (const unit_map::const_iterator& leader : leaders) {
const map_location& keep = leader->get_location();
if (!is_allowed_unit(*leader)) {
LOG_AI_RECRUITMENT << "Leader " << leader->name() << " is not allowed recruiter. \n";
LOG_AI_RECRUITMENT << "Leader " << leader->name() << " is not allowed recruiter.";
continue;
}
if (!resources::gameboard->map().is_keep(keep)) {
LOG_AI_RECRUITMENT << "Leader " << leader->name() << " is not on keep. \n";
LOG_AI_RECRUITMENT << "Leader " << leader->name() << " is not on keep.";
continue;
}
if (pathfind::find_vacant_castle(*leader) == map_location::null_location()) {
LOG_AI_RECRUITMENT << "Leader " << leader->name() << " has no free hexes \n";
LOG_AI_RECRUITMENT << "Leader " << leader->name() << " has no free hexes";
continue;
}
int cheapest_unit_cost = get_cheapest_unit_cost_for_leader(leader);
if (current_team().gold() < cheapest_unit_cost && cheapest_unit_cost > 0) {
LOG_AI_RECRUITMENT << "Leader " << leader->name() << " recruits are too expensive. \n";
LOG_AI_RECRUITMENT << "Leader " << leader->name() << " recruits are too expensive.";
continue;
}
@ -301,12 +301,12 @@ void recruitment::execute() {
}
if (leader_data.empty()) {
LOG_AI_RECRUITMENT << "No leader available for recruiting. \n";
LOG_AI_RECRUITMENT << "No leader available for recruiting.";
return; // This CA is going to be blacklisted for this turn.
}
if (global_recruits.empty()) {
LOG_AI_RECRUITMENT << "All leaders have empty recruitment lists. \n";
LOG_AI_RECRUITMENT << "All leaders have empty recruitment lists.";
return; // This CA is going to be blacklisted for this turn.
}
@ -1546,7 +1546,7 @@ void recruitment::update_state() {
int spend_all_gold = get_recruitment_save_gold()["spend_all_gold"].to_int(-1);
if (spend_all_gold > 0 && current_team().gold() >= spend_all_gold) {
state_ = SPEND_ALL_GOLD;
LOG_AI_RECRUITMENT << "Changed state_ to SPEND_ALL_GOLD. \n";
LOG_AI_RECRUITMENT << "Changed state_ to SPEND_ALL_GOLD.";
return;
}
double ratio = get_unit_ratio();

View File

@ -94,7 +94,7 @@ void manager::add_event_handler_from_wml(const config& handler, game_lua_kernel&
<< " with the following actions:\n"
<< args.debug();
} else {
LOG_EH << "Content of failed event:\n" << handler.debug() << "\n";
LOG_EH << "Content of failed event:\n" << handler.debug();
}
}

View File

@ -311,7 +311,7 @@ void create_engine::init_generated_level_data()
try {
if(!cur_lev->generate_whole_scenario())
{
DBG_MP << "** replacing map ** \n";
DBG_MP << "** replacing map **";
config data = cur_lev->data();
@ -321,7 +321,7 @@ void create_engine::init_generated_level_data()
} else { //scenario generation
DBG_MP << "** replacing scenario ** \n";
DBG_MP << "** replacing scenario **";
config data = generator_->create_scenario();

View File

@ -489,7 +489,7 @@ void set_language(const std::string& language, const std::vector<std::string>* /
{
// why should we need alternates? which languages we support should only be related
// to which languages we ship with and not which the os supports
LOG_G << "setting language to '" << language << "' \n";
LOG_G << "setting language to '" << language << "'";
std::scoped_lock lock(get_mutex());
get_manager().set_language(language);
}

View File

@ -762,18 +762,18 @@ static void convert_old_saves_1_11_0(config& cfg)
// if replay and snapshot are empty we've got a start of scenario save and don't want replay_start either
if(replay.empty() && snapshot.empty()) {
LOG_RG << "removing replay_start \n";
LOG_RG << "removing replay_start";
cfg.clear_children("replay_start");
}
// remove empty replay or snapshot so type of save can be detected more easily
if(replay.empty()) {
LOG_RG << "removing replay \n";
LOG_RG << "removing replay";
cfg.clear_children("replay");
}
if(snapshot.empty()) {
LOG_RG << "removing snapshot \n";
LOG_RG << "removing snapshot";
cfg.clear_children("snapshot");
}
}

View File

@ -4184,7 +4184,7 @@ static int intf_debug_ai(lua_State *L)
config cfg = ai::configuration::get_default_ai_parameters();
lua_engine = new ai::engine_lua(ai_context, cfg);
LOG_LUA << "Created new dummy lua-engine for debug_ai(). \n";
LOG_LUA << "Created new dummy lua-engine for debug_ai().";
//and add the dummy engine as a component
//to the manager, so we could use it later

View File

@ -169,7 +169,7 @@ void plugins_manager::play_slice(const plugins_context & ctxt)
for (std::size_t idx = 0; idx < size(); ++idx)
{
DBG_PLG << "play_slice[" << idx << "] ... \n";
DBG_PLG << "play_slice[" << idx << "] ...";
if (plugins_[idx].thread && plugins_[idx].thread->is_running()) {
DBG_PLG << "is running...";
if (!*local) { //check playing_ before each call to be sure that we should still continue

View File

@ -1032,7 +1032,7 @@ std::string team::get_side_highlight_pango(int side)
void team::log_recruitable() const
{
LOG_NG << "Adding recruitable units: \n";
LOG_NG << "Adding recruitable units:";
for(const std::string& recruit : info_.can_recruit) {
LOG_NG << recruit;
}