Skip to content

Commit

Permalink
change log.error to log.debug
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed Aug 1, 2014
1 parent 6e2c3be commit 8aff097
Showing 1 changed file with 29 additions and 24 deletions.
53 changes: 29 additions & 24 deletions src/main/java/com/alibaba/druid/util/JdbcUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,42 +77,47 @@ public final class JdbcUtils implements JdbcConstants {
}

public final static void close(Connection x) {
if (x != null) {
try {
x.close();
} catch (Exception e) {
LOG.error("close connection error", e);
}
if (x == null) {
return;
}
try {
x.close();
} catch (Exception e) {
LOG.debug("close connection error", e);
}
}

public final static void close(Statement x) {
if (x != null) {
try {
x.close();
} catch (Exception e) {
LOG.error("close statement error", e);
}
if (x == null) {
return;
}
try {
x.close();
} catch (Exception e) {
LOG.debug("close statement error", e);
}
}

public final static void close(ResultSet x) {
if (x != null) {
try {
x.close();
} catch (Exception e) {
LOG.error("close resultset error", e);
}
if (x == null) {
return;
}
try {
x.close();
} catch (Exception e) {
LOG.debug("close resultset error", e);
}
}

public final static void close(Closeable x) {
if (x != null) {
try {
x.close();
} catch (Exception e) {
LOG.error("close error", e);
}
if (x == null) {
return;
}

try {
x.close();
} catch (Exception e) {
LOG.debug("close error", e);
}
}

Expand Down

0 comments on commit 8aff097

Please sign in to comment.