Browse Source

Lower severity of warnings for messages that are less important to clients.

pull/867/head
Keghani Kouzoujian 10 years ago
parent
commit
ba9a6ec733
4 changed files with 12 additions and 10 deletions
  1. +6
    -6
      cpp/src/phonenumbers/phonenumberutil.cc
  2. +6
    -4
      java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java
  3. BIN
      tools/java/cpp-build/target/cpp-build-1.0-SNAPSHOT-jar-with-dependencies.jar
  4. BIN
      tools/java/java-build/target/java-build-1.0-SNAPSHOT-jar-with-dependencies.jar

+ 6
- 6
cpp/src/phonenumbers/phonenumberutil.cc View File

@ -1061,9 +1061,8 @@ void PhoneNumberUtil::FormatOutOfCountryCallingNumber(
string* formatted_number) const {
DCHECK(formatted_number);
if (!IsValidRegionCode(calling_from)) {
LOG(WARNING) << "Trying to format number from invalid region "
<< calling_from
<< ". International formatting applied.";
VLOG(1) << "Trying to format number from invalid region " << calling_from
<< ". International formatting applied.";
Format(number, INTERNATIONAL, formatted_number);
return;
}
@ -1377,9 +1376,10 @@ void PhoneNumberUtil::FormatOutOfCountryKeepingAlphaChars(
// Invalid region entered as country-calling-from (so no metadata was found
// for it) or the region chosen has multiple international dialling
// prefixes.
LOG(WARNING) << "Trying to format number from invalid region "
<< calling_from
<< ". International formatting applied.";
if (!IsValidRegionCode(calling_from)) {
VLOG(1) << "Trying to format number from invalid region " << calling_from
<< ". International formatting applied.";
}
formatted_number->assign(raw_input_copy);
PrefixNumberWithCountryCallingCode(country_code, INTERNATIONAL,
formatted_number);


+ 6
- 4
java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java View File

@ -1639,10 +1639,12 @@ public class PhoneNumberUtil {
} else {
// Invalid region entered as country-calling-from (so no metadata was found for it) or the
// region chosen has multiple international dialling prefixes.
logger.log(Level.WARNING,
"Trying to format number from invalid region "
+ regionCallingFrom
+ ". International formatting applied.");
if (!isValidRegionCode(regionCallingFrom)) {
logger.log(Level.WARNING,
"Trying to format number from invalid region "
+ regionCallingFrom
+ ". International formatting applied.");
}
prefixNumberWithCountryCallingCode(countryCode,
PhoneNumberFormat.INTERNATIONAL,
formattedNumber);


BIN
tools/java/cpp-build/target/cpp-build-1.0-SNAPSHOT-jar-with-dependencies.jar View File


BIN
tools/java/java-build/target/java-build-1.0-SNAPSHOT-jar-with-dependencies.jar View File


Loading…
Cancel
Save