|  | @@ -276,7 +276,7 @@ void ArmijoLineSearch::Search(const double step_size_estimate,
 | 
	
		
			
				|  |  |                         "satisfying the sufficient decrease condition within "
 | 
	
		
			
				|  |  |                         "specified max_num_iterations: %d.",
 | 
	
		
			
				|  |  |                         options().max_num_iterations);
 | 
	
		
			
				|  |  | -      LOG(WARNING) << summary->error;
 | 
	
		
			
				|  |  | +      LOG_IF(WARNING, !options().is_silent) << summary->error;
 | 
	
		
			
				|  |  |        return;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -294,7 +294,7 @@ void ArmijoLineSearch::Search(const double step_size_estimate,
 | 
	
		
			
				|  |  |            StringPrintf("Line search failed: step_size too small: %.5e "
 | 
	
		
			
				|  |  |                         "with descent_direction_max_norm: %.5e.", step_size,
 | 
	
		
			
				|  |  |                         descent_direction_max_norm);
 | 
	
		
			
				|  |  | -      LOG(WARNING) << summary->error;
 | 
	
		
			
				|  |  | +      LOG_IF(WARNING, !options().is_silent) << summary->error;
 | 
	
		
			
				|  |  |        return;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -547,15 +547,16 @@ bool WolfeLineSearch::BracketingPhase(
 | 
	
		
			
				|  |  |        // conditions, or a valid bracket containing such a point. Stop searching
 | 
	
		
			
				|  |  |        // and set bracket_low to the size size amongst all those tested which
 | 
	
		
			
				|  |  |        // minimizes f() and satisfies the Armijo condition.
 | 
	
		
			
				|  |  | -      LOG(WARNING) << "Line search failed: Wolfe bracketing phase shrank "
 | 
	
		
			
				|  |  | -                   << "bracket width: " << fabs(current.x - previous.x)
 | 
	
		
			
				|  |  | -                   <<  ", to < tolerance: " << options().min_step_size
 | 
	
		
			
				|  |  | -                   << ", with descent_direction_max_norm: "
 | 
	
		
			
				|  |  | -                   << descent_direction_max_norm << ", and failed to find "
 | 
	
		
			
				|  |  | -                   << "a point satisfying the strong Wolfe conditions or a "
 | 
	
		
			
				|  |  | -                   << "bracketing containing such a point. Accepting "
 | 
	
		
			
				|  |  | -                   << "point found satisfying Armijo condition only, to "
 | 
	
		
			
				|  |  | -                   << "allow continuation.";
 | 
	
		
			
				|  |  | +      LOG_IF(WARNING, !options().is_silent)
 | 
	
		
			
				|  |  | +          << "Line search failed: Wolfe bracketing phase shrank "
 | 
	
		
			
				|  |  | +          << "bracket width: " << fabs(current.x - previous.x)
 | 
	
		
			
				|  |  | +          <<  ", to < tolerance: " << options().min_step_size
 | 
	
		
			
				|  |  | +          << ", with descent_direction_max_norm: "
 | 
	
		
			
				|  |  | +          << descent_direction_max_norm << ", and failed to find "
 | 
	
		
			
				|  |  | +          << "a point satisfying the strong Wolfe conditions or a "
 | 
	
		
			
				|  |  | +          << "bracketing containing such a point. Accepting "
 | 
	
		
			
				|  |  | +          << "point found satisfying Armijo condition only, to "
 | 
	
		
			
				|  |  | +          << "allow continuation.";
 | 
	
		
			
				|  |  |        *bracket_low = current;
 | 
	
		
			
				|  |  |        break;
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -568,7 +569,7 @@ bool WolfeLineSearch::BracketingPhase(
 | 
	
		
			
				|  |  |                         "find a point satisfying strong Wolfe conditions, or a "
 | 
	
		
			
				|  |  |                         "bracket containing such a point within specified "
 | 
	
		
			
				|  |  |                         "max_num_iterations: %d", options().max_num_iterations);
 | 
	
		
			
				|  |  | -      LOG(WARNING) << summary->error;
 | 
	
		
			
				|  |  | +      LOG_IF(WARNING, !options().is_silent) << summary->error;
 | 
	
		
			
				|  |  |        // Ensure that bracket_low is always set to the step size amongst all
 | 
	
		
			
				|  |  |        // those tested which minimizes f() and satisfies the Armijo condition
 | 
	
		
			
				|  |  |        // when we terminate due to the 'artificial' max_num_iterations condition.
 | 
	
	
		
			
				|  | @@ -607,7 +608,7 @@ bool WolfeLineSearch::BracketingPhase(
 | 
	
		
			
				|  |  |            StringPrintf("Line search failed: step_size too small: %.5e "
 | 
	
		
			
				|  |  |                         "with descent_direction_max_norm: %.5e", step_size,
 | 
	
		
			
				|  |  |                         descent_direction_max_norm);
 | 
	
		
			
				|  |  | -      LOG(WARNING) << summary->error;
 | 
	
		
			
				|  |  | +      LOG_IF(WARNING, !options().is_silent) << summary->error;
 | 
	
		
			
				|  |  |        return false;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -691,7 +692,7 @@ bool WolfeLineSearch::ZoomPhase(const FunctionSample& initial_position,
 | 
	
		
			
				|  |  |                       initial_position.ToDebugString().c_str(),
 | 
	
		
			
				|  |  |                       bracket_low.ToDebugString().c_str(),
 | 
	
		
			
				|  |  |                       bracket_high.ToDebugString().c_str());
 | 
	
		
			
				|  |  | -    LOG(WARNING) << summary->error;
 | 
	
		
			
				|  |  | +    LOG_IF(WARNING, !options().is_silent) << summary->error;
 | 
	
		
			
				|  |  |      solution->value_is_valid = false;
 | 
	
		
			
				|  |  |      return false;
 | 
	
		
			
				|  |  |    }
 | 
	
	
		
			
				|  | @@ -712,7 +713,7 @@ bool WolfeLineSearch::ZoomPhase(const FunctionSample& initial_position,
 | 
	
		
			
				|  |  |                         "within specified max_num_iterations: %d, "
 | 
	
		
			
				|  |  |                         "(num iterations taken for bracketing: %d).",
 | 
	
		
			
				|  |  |                         options().max_num_iterations, num_bracketing_iterations);
 | 
	
		
			
				|  |  | -      LOG(WARNING) << summary->error;
 | 
	
		
			
				|  |  | +      LOG_IF(WARNING, !options().is_silent) << summary->error;
 | 
	
		
			
				|  |  |        return false;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |      if (fabs(bracket_high.x - bracket_low.x) * descent_direction_max_norm
 | 
	
	
		
			
				|  | @@ -724,7 +725,7 @@ bool WolfeLineSearch::ZoomPhase(const FunctionSample& initial_position,
 | 
	
		
			
				|  |  |                         "too small with descent_direction_max_norm: %.5e.",
 | 
	
		
			
				|  |  |                         fabs(bracket_high.x - bracket_low.x),
 | 
	
		
			
				|  |  |                         descent_direction_max_norm);
 | 
	
		
			
				|  |  | -      LOG(WARNING) << summary->error;
 | 
	
		
			
				|  |  | +      LOG_IF(WARNING, !options().is_silent) << summary->error;
 | 
	
		
			
				|  |  |        return false;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -775,7 +776,7 @@ bool WolfeLineSearch::ZoomPhase(const FunctionSample& initial_position,
 | 
	
		
			
				|  |  |                         "between low_step: %.5e and high_step: %.5e "
 | 
	
		
			
				|  |  |                         "at which function is valid.",
 | 
	
		
			
				|  |  |                         solution->x, bracket_low.x, bracket_high.x);
 | 
	
		
			
				|  |  | -      LOG(WARNING) << summary->error;
 | 
	
		
			
				|  |  | +      LOG_IF(WARNING, !options().is_silent) << summary->error;
 | 
	
		
			
				|  |  |        return false;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 |