DS-2584 loglevel error -> info for usage events beyond admin's control

* DNS reverse lookup
* Country, Continent lookup
This commit is contained in:
Ivan Masár
2015-05-20 09:17:40 +02:00
parent c778a94b48
commit dc7ab71dac
3 changed files with 8 additions and 8 deletions

View File

@@ -238,7 +238,7 @@ public class ElasticSearchLoggerServiceImpl implements ElasticSearchLoggerServic
String dns = DnsLookup.reverseDns(ip); String dns = DnsLookup.reverseDns(ip);
docBuilder.field("dns", dns.toLowerCase()); docBuilder.field("dns", dns.toLowerCase());
} catch (Exception e) { } catch (Exception e) {
log.error("Failed DNS Lookup for IP:" + ip); log.info("Failed DNS Lookup for IP:" + ip);
log.debug(e.getMessage(), e); log.debug(e.getMessage(), e);
} }
@@ -356,7 +356,7 @@ public class ElasticSearchLoggerServiceImpl implements ElasticSearchLoggerServic
String dns = DnsLookup.reverseDns(ip); String dns = DnsLookup.reverseDns(ip);
docBuilder.field("dns", dns.toLowerCase()); docBuilder.field("dns", dns.toLowerCase());
} catch (Exception e) { } catch (Exception e) {
log.error("Failed DNS Lookup for IP:" + ip); log.info("Failed DNS Lookup for IP:" + ip);
log.debug(e.getMessage(), e); log.debug(e.getMessage(), e);
} }

View File

@@ -318,7 +318,7 @@ public class SolrLoggerServiceImpl implements SolrLoggerService, InitializingBea
} }
catch (Exception e) catch (Exception e)
{ {
log.error("Failed DNS Lookup for IP:" + ip); log.info("Failed DNS Lookup for IP:" + ip);
log.debug(e.getMessage(),e); log.debug(e.getMessage(),e);
} }
if(request.getHeader("User-Agent") != null) if(request.getHeader("User-Agent") != null)
@@ -404,7 +404,7 @@ public class SolrLoggerServiceImpl implements SolrLoggerService, InitializingBea
} }
catch (Exception e) catch (Exception e)
{ {
log.error("Failed DNS Lookup for IP:" + ip); log.info("Failed DNS Lookup for IP:" + ip);
log.debug(e.getMessage(),e); log.debug(e.getMessage(),e);
} }
if(userAgent != null) if(userAgent != null)

View File

@@ -43,7 +43,7 @@ public class LocationUtils
{ {
if (null == countryCode) if (null == countryCode)
{ {
logger.error("Null country code"); logger.info("Null country code");
return I18nUtil return I18nUtil
.getMessage("org.dspace.statistics.util.LocationUtils.unknown-continent"); .getMessage("org.dspace.statistics.util.LocationUtils.unknown-continent");
} }
@@ -62,7 +62,7 @@ public class LocationUtils
String continent = countryToContinent.getProperty(countryCode); String continent = countryToContinent.getProperty(countryCode);
if (null == continent) if (null == continent)
{ {
logger.error("Unknown country code " + countryCode); logger.info("Unknown country code " + countryCode);
return I18nUtil return I18nUtil
.getMessage("org.dspace.statistics.util.LocationUtils.unknown-continent"); .getMessage("org.dspace.statistics.util.LocationUtils.unknown-continent");
} }
@@ -99,7 +99,7 @@ public class LocationUtils
if (null == continentCode) if (null == continentCode)
{ {
logger.error("Null continentCode"); logger.info("Null continentCode");
return I18nUtil return I18nUtil
.getMessage("org.dspace.statistics.util.LocationUtils.unknown-continent"); .getMessage("org.dspace.statistics.util.LocationUtils.unknown-continent");
} }
@@ -123,7 +123,7 @@ public class LocationUtils
} }
catch (MissingResourceException e) catch (MissingResourceException e)
{ {
logger.error("No continent code " + continentCode + " in bundle " logger.info("No continent code " + continentCode + " in bundle "
+ names.getLocale().getDisplayName()); + names.getLocale().getDisplayName());
return I18nUtil return I18nUtil
.getMessage("org.dspace.statistics.util.LocationUtils.unknown-continent"); .getMessage("org.dspace.statistics.util.LocationUtils.unknown-continent");