Varargification.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2537 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -42,7 +42,7 @@ public class StreamUtil
|
||||
try {
|
||||
in.close();
|
||||
} catch (IOException ioe) {
|
||||
log.warning("Error closing input stream [stream=" + in + ", cause=" + ioe + "].");
|
||||
log.warning("Error closing input stream", "stream", in, "cause", ioe);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,7 @@ public class StreamUtil
|
||||
try {
|
||||
out.close();
|
||||
} catch (IOException ioe) {
|
||||
log.warning("Error closing output stream [stream=" + out + ", cause=" + ioe + "].");
|
||||
log.warning("Error closing output stream", "stream", out, "cause", ioe);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,7 +70,7 @@ public class StreamUtil
|
||||
try {
|
||||
in.close();
|
||||
} catch (IOException ioe) {
|
||||
log.warning("Error closing reader [reader=" + in + ", cause=" + ioe + "].");
|
||||
log.warning("Error closing reader", "reader", in, "cause", ioe);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,7 +84,7 @@ public class StreamUtil
|
||||
try {
|
||||
out.close();
|
||||
} catch (IOException ioe) {
|
||||
log.warning("Error closing writer [writer=" + out + ", cause=" + ioe + "].");
|
||||
log.warning("Error closing writer", "writer", out, "cause", ioe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,8 +115,8 @@ public class JDBCUtil
|
||||
{
|
||||
int modified = stmt.executeUpdate();
|
||||
if (modified != expectedCount) {
|
||||
log.warning("Statement did not modify expected number of rows [stmt=" + stmt +
|
||||
", expected=" + expectedCount + ", modified=" + modified + "]");
|
||||
log.warning("Statement did not modify expected number of rows", "stmt", stmt,
|
||||
"expected", expectedCount, "modified", modified);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,8 +184,8 @@ public class JDBCUtil
|
||||
{
|
||||
int modified = stmt.executeUpdate(query);
|
||||
if (modified != expectedCount) {
|
||||
log.warning("Statement did not modify expected number of rows [stmt=" + stmt +
|
||||
", expected=" + expectedCount + ", modified=" + modified + "]");
|
||||
log.warning("Statement did not modify expected number of rows", "stmt", stmt,
|
||||
"expected", expectedCount, "modified", modified);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ public class JDBCUtil
|
||||
try {
|
||||
return new String(text.getBytes("UTF8"), "8859_1");
|
||||
} catch (UnsupportedEncodingException uee) {
|
||||
log.warning("jigger failed", uee);
|
||||
log.warning("Jigger failed", uee);
|
||||
return text;
|
||||
}
|
||||
}
|
||||
@@ -247,7 +247,7 @@ public class JDBCUtil
|
||||
try {
|
||||
return new String(text.getBytes("8859_1"), "UTF8");
|
||||
} catch (UnsupportedEncodingException uee) {
|
||||
log.warning("unjigger failed", uee);
|
||||
log.warning("Unjigger failed", uee);
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,8 +52,7 @@ public class LiaisonRegistry
|
||||
|
||||
// if we didn't find a matching liaison, use the default
|
||||
if (liaison == null) {
|
||||
log.warning("Unable to match liaison for database [url=" + url + "]. " +
|
||||
"Using default.");
|
||||
log.warning("Unable to match liaison for database. Using default.", "url", url);
|
||||
liaison = new DefaultLiaison();
|
||||
}
|
||||
|
||||
@@ -79,8 +78,7 @@ public class LiaisonRegistry
|
||||
try {
|
||||
_liaisons.add(lclass.newInstance());
|
||||
} catch (Exception e) {
|
||||
log.warning("Unable to instantiate liaison [class=" + lclass.getName() +
|
||||
", error=" + e + "].");
|
||||
log.warning("Unable to instantiate liaison", "class", lclass.getName(), "error", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ public class SimpleRepository extends Repository
|
||||
}
|
||||
});
|
||||
} catch (PersistenceException pe) {
|
||||
log.warning("Failure migrating schema [dbident=" + _dbident + "].", pe);
|
||||
log.warning("Failure migrating schema", "dbident", _dbident, pe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,8 +143,8 @@ public class SimpleRepository extends Repository
|
||||
|
||||
// check our pre-condition
|
||||
if (_precond != null && !_precond.validate(_dbident, op)) {
|
||||
log.warning("Repository operation failed pre-condition check! [dbident=" + _dbident +
|
||||
", op=" + op + "].");
|
||||
log.warning("Repository operation failed pre-condition check!", "dbident", _dbident,
|
||||
"op", op);
|
||||
Thread.dumpStack();
|
||||
}
|
||||
|
||||
@@ -193,8 +193,7 @@ public class SimpleRepository extends Repository
|
||||
conn.rollback();
|
||||
}
|
||||
} catch (SQLException rbe) {
|
||||
log.warning("Unable to roll back operation [err=" + sqe +
|
||||
", rberr=" + rbe + "].");
|
||||
log.warning("Unable to roll back operation", "err", sqe, "rberr", rbe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,7 +214,7 @@ public class SimpleRepository extends Repository
|
||||
// stack trace in the message of their outer exception; if I want a fucking stack
|
||||
// trace, I'll call printStackTrace() thanksverymuch
|
||||
String msg = StringUtil.split("" + sqe, "\n")[0];
|
||||
log.info("Transient failure executing operation, retrying [error=" + msg + "].");
|
||||
log.info("Transient failure executing operation, retrying", "error", msg);
|
||||
|
||||
} catch (PersistenceException pe) {
|
||||
// back out our changes if something got hosed
|
||||
@@ -224,8 +223,7 @@ public class SimpleRepository extends Repository
|
||||
conn.rollback();
|
||||
}
|
||||
} catch (SQLException rbe) {
|
||||
log.warning("Unable to roll back operation [origerr=" + pe +
|
||||
", rberr=" + rbe + "].");
|
||||
log.warning("Unable to roll back operation", "origerr", pe, "rberr", rbe);
|
||||
}
|
||||
throw pe;
|
||||
|
||||
@@ -236,8 +234,7 @@ public class SimpleRepository extends Repository
|
||||
conn.rollback();
|
||||
}
|
||||
} catch (SQLException rbe) {
|
||||
log.warning("Unable to roll back operation [origerr=" + rte +
|
||||
", rberr=" + rbe + "].");
|
||||
log.warning("Unable to roll back operation", "origerr", rte, "rberr", rbe);
|
||||
}
|
||||
throw rte;
|
||||
|
||||
@@ -249,7 +246,7 @@ public class SimpleRepository extends Repository
|
||||
conn.setAutoCommit(oldAutoCommit);
|
||||
}
|
||||
} catch (SQLException sace) {
|
||||
log.warning("Unable to restore auto-commit [err=" + sace + "].");
|
||||
log.warning("Unable to restore auto-commit", "err", sace);
|
||||
}
|
||||
// release the database connection
|
||||
_provider.releaseConnection(_dbident, readOnly, conn);
|
||||
|
||||
@@ -188,7 +188,7 @@ public class StaticConnectionProvider implements ConnectionProvider
|
||||
String mapkey = ident + ":" + readOnly;
|
||||
Mapping conmap = _idents.get(mapkey);
|
||||
if (conmap == null) {
|
||||
log.warning("Unknown connection failed!? [key=" + mapkey + "].");
|
||||
log.warning("Unknown connection failed!?", "key", mapkey);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -251,8 +251,7 @@ public class StaticConnectionProvider implements ConnectionProvider
|
||||
try {
|
||||
conn.close();
|
||||
} catch (SQLException sqe) {
|
||||
log.warning("Error closing failed connection [ident=" + ident +
|
||||
", error=" + sqe + "].");
|
||||
log.warning("Error closing failed connection", "ident", ident, "error", sqe);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -73,8 +73,8 @@ public class TransitionRepository extends SimpleRepository
|
||||
try {
|
||||
clearTransition(clazz, name);
|
||||
} catch (PersistenceException pe) {
|
||||
log.warning("Failed to clear failed transition [class=" + clazz +
|
||||
", name=" + name + "].", pe);
|
||||
log.warning("Failed to clear failed transition", "class", clazz, "name", name,
|
||||
pe);
|
||||
}
|
||||
throw e;
|
||||
|
||||
@@ -82,8 +82,8 @@ public class TransitionRepository extends SimpleRepository
|
||||
try {
|
||||
clearTransition(clazz, name);
|
||||
} catch (PersistenceException pe) {
|
||||
log.warning("Failed to clear failed transition [class=" + clazz +
|
||||
", name=" + name + "].", pe);
|
||||
log.warning("Failed to clear failed transition", "class", clazz, "name", name,
|
||||
pe);
|
||||
}
|
||||
throw rte;
|
||||
}
|
||||
|
||||
@@ -96,9 +96,8 @@ public class Cursor<V>
|
||||
spurious++;
|
||||
}
|
||||
if (spurious > 0) {
|
||||
log.warning("Cursor.get() quietly tossed " + spurious +
|
||||
" spurious additional records. " +
|
||||
"[query=" + _query + "].");
|
||||
log.warning("Cursor.get() quietly tossed " + spurious + " spurious additional " +
|
||||
"records.", "query", _query);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -92,8 +92,8 @@ public class AttachableURLFactory implements URLStreamHandlerFactory
|
||||
try {
|
||||
return handler.newInstance();
|
||||
} catch (Exception e) {
|
||||
log.warning("Unable to instantiate URLStreamHandler" +
|
||||
" [protocol=" + protocol + ", cause=" + e + "].");
|
||||
log.warning("Unable to instantiate URLStreamHandler", "protocol", protocol,
|
||||
"cause", e);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -184,8 +184,7 @@ public class MessageManager
|
||||
|
||||
if (reportMissing) {
|
||||
// if there's no translation for this path, complain about it
|
||||
log.warning("Missing translation message [path=" + path +
|
||||
", url=" + getURL(req) + "].");
|
||||
log.warning("Missing translation message", "path", path, "url", getURL(req));
|
||||
return path;
|
||||
}
|
||||
|
||||
@@ -218,8 +217,8 @@ public class MessageManager
|
||||
try {
|
||||
siteLoader = _siteLoader.getSiteClassLoader(siteId);
|
||||
} catch (IOException ioe) {
|
||||
log.warning("Unable to fetch site-specific classloader " +
|
||||
"[siteId=" + siteId + ", error=" + ioe + "].");
|
||||
log.warning("Unable to fetch site-specific classloader", "siteId", siteId,
|
||||
"error", ioe);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -293,10 +292,9 @@ public class MessageManager
|
||||
if (!silent) {
|
||||
// if we were unable even to find a default bundle, we may want to log a
|
||||
// warning
|
||||
log.warning("Unable to resolve any message bundle [req=" + getURL(req) +
|
||||
", locale=" + locale + ", bundlePath=" + bundlePath +
|
||||
", classLoader=" + loader + ", siteBundlePath=" + _siteBundlePath +
|
||||
", siteLoader=" + _siteLoader + "].");
|
||||
log.warning("Unable to resolve any message bundle", "req", getURL(req),
|
||||
"locale", locale, "bundlePath", bundlePath, "classLoader", loader,
|
||||
"siteBundlePath", _siteBundlePath, "siteLoader", _siteLoader);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ public class SiteResourceLoader
|
||||
jarFile.close();
|
||||
}
|
||||
|
||||
log.info("Opened site bundle [path=" + file.getPath() + "].");
|
||||
log.info("Opened site bundle", "path", file.getPath());
|
||||
|
||||
// and open a new one
|
||||
jarFile = new JarFile(file);
|
||||
@@ -337,9 +337,8 @@ public class SiteResourceLoader
|
||||
try {
|
||||
return _bundle.getResourceAsStream(path);
|
||||
} catch (IOException ioe) {
|
||||
log.warning("Error loading resource from jarfile " +
|
||||
"[bundle=" + _bundle + ", path=" + path +
|
||||
", error=" + ioe + "].");
|
||||
log.warning("Error loading resource from jarfile", "bundle", _bundle, "path", path,
|
||||
"error", ioe);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,8 +135,7 @@ public class UserManager
|
||||
}
|
||||
|
||||
if (USERMGR_DEBUG) {
|
||||
log.info("UserManager initialized [acook=" + _userAuthCookie +
|
||||
", login=" + _loginURL + "].");
|
||||
log.info("UserManager initialized", "acook", _userAuthCookie, "login", _loginURL);
|
||||
}
|
||||
|
||||
// register a cron job to prune the session table every hour
|
||||
@@ -181,7 +180,7 @@ public class UserManager
|
||||
{
|
||||
String authcook = CookieUtil.getCookieValue(req, _userAuthCookie);
|
||||
if (USERMGR_DEBUG) {
|
||||
log.info("Loading user by cookie [" + _userAuthCookie + "=" + authcook + "].");
|
||||
log.info("Loading user by cookie", _userAuthCookie, authcook);
|
||||
}
|
||||
return loadUser(authcook);
|
||||
}
|
||||
@@ -194,7 +193,7 @@ public class UserManager
|
||||
{
|
||||
User user = (authcode == null) ? null : _repository.loadUserBySession(authcode);
|
||||
if (USERMGR_DEBUG) {
|
||||
log.info("Loaded user by authcode [code=" + authcode + ", user=" + user + "].");
|
||||
log.info("Loaded user by authcode", "code", authcode, "user", user);
|
||||
}
|
||||
return user;
|
||||
}
|
||||
@@ -217,7 +216,7 @@ public class UserManager
|
||||
String eurl = RequestUtils.getLocationEncoded(req);
|
||||
String target = StringUtil.replace(_loginURL, "%R", eurl);
|
||||
if (USERMGR_DEBUG) {
|
||||
log.info("No user found in require, redirecting [to=" + target + "].");
|
||||
log.info("No user found in require, redirecting", "to", target);
|
||||
}
|
||||
throw new RedirectException(target);
|
||||
}
|
||||
@@ -304,7 +303,7 @@ public class UserManager
|
||||
// register a session for this user
|
||||
String authcode = _repository.registerSession(user, expires);
|
||||
if (USERMGR_DEBUG) {
|
||||
log.info("Session started [user=" + username + ", code=" + authcode + "].");
|
||||
log.info("Session started", "user", username, "code", authcode);
|
||||
}
|
||||
return new Tuple<User,String>(user, authcode);
|
||||
}
|
||||
|
||||
@@ -117,9 +117,8 @@ public class ExceptionMap
|
||||
_keys.add(cl);
|
||||
|
||||
} catch (Throwable t) {
|
||||
log.warning("Unable to resolve exception class. " +
|
||||
"[class=" + exclass +
|
||||
", error=" + t + "].");
|
||||
log.warning("Unable to resolve exception class.", "class", exclass,
|
||||
"error", t);
|
||||
_values.remove(i);
|
||||
i--; // back on up a notch
|
||||
}
|
||||
|
||||
@@ -85,8 +85,7 @@ public class AbsoluteLayout
|
||||
|
||||
Object constr = _constraints.get(comp);
|
||||
if (constr == null) {
|
||||
log.warning("No constraints for child!? [cont=" + parent +
|
||||
", comp=" + comp + "].");
|
||||
log.warning("No constraints for child!?", "cont", parent, "comp", comp);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -137,8 +136,7 @@ public class AbsoluteLayout
|
||||
|
||||
Object constr = _constraints.get(comp);
|
||||
if (constr == null) {
|
||||
log.warning("No constraints for child!? [cont=" + parent +
|
||||
", comp=" + comp + "].");
|
||||
log.warning("No constraints for child!?", "cont", parent, "comp", comp);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -297,8 +297,8 @@ public abstract class Controller
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
log.warning("Error searching for action handler method " +
|
||||
"[controller=" + this + ", action=" + action + "].");
|
||||
log.warning("Error searching for action handler method", "controller", this,
|
||||
"action", action);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -311,8 +311,7 @@ public abstract class Controller
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
log.warning("Error invoking action handler [controller=" + this +
|
||||
", action=" + action + "].", e);
|
||||
log.warning("Error invoking action handler", "controller", this, "action", action, e);
|
||||
// even though we choked, we still "handled" the action
|
||||
return true;
|
||||
}
|
||||
@@ -368,10 +367,8 @@ public abstract class Controller
|
||||
if (argument != null) {
|
||||
return new Object[] { source, argument };
|
||||
}
|
||||
|
||||
log.warning("Unable to map argumentless event to handler method " +
|
||||
"that requires an argument [controller=" + this +
|
||||
", method=" + method + ", source=" + source + "].");
|
||||
log.warning("Unable to map argumentless event to handler method that requires an " +
|
||||
"argument", "controller", this, "method", method, "source", source);
|
||||
}
|
||||
|
||||
// we would have handled it, but we couldn't
|
||||
@@ -394,9 +391,8 @@ public abstract class Controller
|
||||
// do some sanity checking on the source
|
||||
Object src = _action.getSource();
|
||||
if (src == null || !(src instanceof Component)) {
|
||||
log.warning("Requested to dispatch action on " +
|
||||
"non-component source [source=" + src +
|
||||
", action=" + _action + "].");
|
||||
log.warning("Requested to dispatch action on non-component source", "source", src,
|
||||
"action", _action);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -410,8 +406,7 @@ public abstract class Controller
|
||||
|
||||
Controller ctrl = ((ControllerProvider)source).getController();
|
||||
if (ctrl == null) {
|
||||
log.warning("Provider returned null controller " +
|
||||
"[provider=" + source + "].");
|
||||
log.warning("Provider returned null controller", "provider", source);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -423,15 +418,12 @@ public abstract class Controller
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
log.warning("Controller choked on action " +
|
||||
"[ctrl=" + ctrl +
|
||||
", action=" + _action + "].", e);
|
||||
log.warning("Controller choked on action", "ctrl", ctrl, "action", _action, e);
|
||||
}
|
||||
}
|
||||
|
||||
// if we got here, we didn't find a controller
|
||||
log.warning("Unable to find a controller to process action " +
|
||||
"[action=" + _action + "].");
|
||||
log.warning("Unable to find a controller to process action", "action", _action);
|
||||
}
|
||||
|
||||
protected ActionEvent _action;
|
||||
|
||||
@@ -83,8 +83,8 @@ public class EnablingAdapter
|
||||
if (value instanceof Boolean) {
|
||||
stateChanged(((Boolean)value).booleanValue());
|
||||
} else {
|
||||
log.warning("PropertyChangeEnabler connected to " +
|
||||
"non-Boolean property [got=" + value + "].");
|
||||
log.warning("PropertyChangeEnabler connected to non-Boolean property",
|
||||
"got", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -515,7 +515,7 @@ public class Label implements SwingConstants, LabelStyleConstants
|
||||
}
|
||||
|
||||
} catch (Throwable t) {
|
||||
log.warning("Label layout failed [text=" + _text + "].", t);
|
||||
log.warning("Label layout failed", "text", _text, t);
|
||||
}
|
||||
|
||||
return layouts;
|
||||
@@ -528,8 +528,8 @@ public class Label implements SwingConstants, LabelStyleConstants
|
||||
{
|
||||
// nothing to do if we haven't been laid out
|
||||
if (_layouts == null) {
|
||||
log.warning(hashCode() + " Unlaid-out label asked to render [text=" + _text +
|
||||
/* ", last=" + _invalidator + */ "].");
|
||||
log.warning(hashCode() + " Unlaid-out label asked to render", "text", _text
|
||||
/*, "last", _invalidator */);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -279,9 +279,8 @@ public class RuntimeAdjust
|
||||
public void setValue (String value)
|
||||
{
|
||||
if (!ListUtil.contains(_values, value)) {
|
||||
log.warning("Refusing invalid adjustment [name=" + _name +
|
||||
", values=" + StringUtil.toString(_values) +
|
||||
", value=" + value + "].");
|
||||
log.warning("Refusing invalid adjustment", "name", _name, "values", _values,
|
||||
"value", value);
|
||||
} else {
|
||||
_config.setValue(_name, value);
|
||||
}
|
||||
@@ -486,8 +485,7 @@ public class RuntimeAdjust
|
||||
// validate the structure of the name
|
||||
int fdidx = _name.indexOf("."), ldidx = _name.lastIndexOf(".");
|
||||
if (fdidx == -1 || ldidx == -1) {
|
||||
log.warning("Invalid adjustment name '" + _name +
|
||||
"', must be of the form " +
|
||||
log.warning("Invalid adjustment name '" + _name + "', must be of the form " +
|
||||
"'library.package.adjustment'.");
|
||||
return;
|
||||
}
|
||||
@@ -495,9 +493,8 @@ public class RuntimeAdjust
|
||||
// make sure there isn't another with the same name
|
||||
int idx = _adjusts.binarySearch(this);
|
||||
if (idx >= 0) {
|
||||
log.warning("Error: duplicate adjust registration " +
|
||||
"[new=" + this +
|
||||
", old=" + _adjusts.get(idx) + "].");
|
||||
log.warning("Error: duplicate adjust registration", "new", this,
|
||||
"old", _adjusts.get(idx));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -226,9 +226,8 @@ public class MenuUtil
|
||||
_target = target;
|
||||
|
||||
} catch (Exception e) {
|
||||
log.warning("Unable to obtain menu callback method " +
|
||||
"[target=" + target + ", method=" + _method +
|
||||
", error=" + e + "]. Item will not function.");
|
||||
log.warning("Unable to obtain menu callback method. Item will not function.",
|
||||
"target", target, "method", _method, "error", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -238,9 +237,8 @@ public class MenuUtil
|
||||
try {
|
||||
_method.invoke(_target, new Object[] { event });
|
||||
} catch (Exception e) {
|
||||
log.warning("Failure invoking menu callback " +
|
||||
"[target=" + _target +
|
||||
", method=" + _method + "].", e);
|
||||
log.warning("Failure invoking menu callback", "target", _target,
|
||||
"method", _method, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,8 +93,7 @@ public class AuditLogger
|
||||
log.warning("Suppressed " + _throttled + " intervening error messages.");
|
||||
_throttled = 0;
|
||||
}
|
||||
log.warning("Failed to write audit log message [file=" + _logPath +
|
||||
", msg=" + message + "].");
|
||||
log.warning("Failed to write audit log message", "file", _logPath, "msg", message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -131,7 +130,7 @@ public class AuditLogger
|
||||
if (freakout) {
|
||||
throw new RuntimeException(errmsg, ioe);
|
||||
} else {
|
||||
log.warning(errmsg + " [ioe=" + ioe + "].");
|
||||
log.warning(errmsg, "ioe", ioe);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -153,8 +152,7 @@ public class AuditLogger
|
||||
// rename the old file
|
||||
String npath = _logPath.getPath() + "." + _dayStamp;
|
||||
if (!_logPath.renameTo(new File(npath))) {
|
||||
log.warning("Failed to rename audit log file [path=" + _logPath +
|
||||
", npath=" + npath + "].");
|
||||
log.warning("Failed to rename audit log file", "path", _logPath, "npath", npath);
|
||||
}
|
||||
|
||||
// open our new log file
|
||||
|
||||
@@ -134,7 +134,7 @@ public class Config
|
||||
try {
|
||||
return Integer.decode(val).intValue(); // handles base 10, hex values, etc.
|
||||
} catch (NumberFormatException nfe) {
|
||||
log.warning("Malformed integer property [name=" + name + ", value=" + val + "].");
|
||||
log.warning("Malformed integer property", "name", name, "value", val);
|
||||
}
|
||||
}
|
||||
return defval;
|
||||
@@ -159,8 +159,7 @@ public class Config
|
||||
try {
|
||||
defval = Long.parseLong(val);
|
||||
} catch (NumberFormatException nfe) {
|
||||
log.warning("Malformed long integer property [name=" + name +
|
||||
", value=" + val + "].");
|
||||
log.warning("Malformed long integer property", "name", name, "value", val);
|
||||
}
|
||||
}
|
||||
return defval;
|
||||
@@ -185,8 +184,7 @@ public class Config
|
||||
try {
|
||||
defval = Float.parseFloat(val);
|
||||
} catch (NumberFormatException nfe) {
|
||||
log.warning("Malformed float property [name=" + name +
|
||||
", value=" + val + "].");
|
||||
log.warning("Malformed float property", "name", name, "value", val);
|
||||
}
|
||||
}
|
||||
return defval;
|
||||
@@ -248,8 +246,7 @@ public class Config
|
||||
if (val != null) {
|
||||
result = StringUtil.parseIntArray(val);
|
||||
if (result == null) {
|
||||
log.warning("Malformed int array property [name=" + name +
|
||||
", value=" + val + "].");
|
||||
log.warning("Malformed int array property", "name", name, "value", val);
|
||||
return defval;
|
||||
}
|
||||
}
|
||||
@@ -279,8 +276,7 @@ public class Config
|
||||
if (val != null) {
|
||||
result = StringUtil.parseLongArray(val);
|
||||
if (result == null) {
|
||||
log.warning("Malformed int array property [name=" + name +
|
||||
", value=" + val + "].");
|
||||
log.warning("Malformed int array property", "name", name, "value", val);
|
||||
return defval;
|
||||
}
|
||||
}
|
||||
@@ -310,8 +306,7 @@ public class Config
|
||||
if (val != null) {
|
||||
result = StringUtil.parseFloatArray(val);
|
||||
if (result == null) {
|
||||
log.warning("Malformed int array property [name=" + name +
|
||||
", value=" + val + "].");
|
||||
log.warning("Malformed int array property", "name", name, "value", val);
|
||||
return defval;
|
||||
}
|
||||
}
|
||||
@@ -341,8 +336,7 @@ public class Config
|
||||
if (val != null) {
|
||||
result = StringUtil.parseStringArray(val);
|
||||
if (result == null) {
|
||||
log.warning("Malformed string array property [name=" + name +
|
||||
", value=" + val + "].");
|
||||
log.warning("Malformed string array property", "name", name, "value", val);
|
||||
return defval;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,8 +47,7 @@ public class ConfigUtil
|
||||
try {
|
||||
value = Integer.parseInt(valstr);
|
||||
} catch (NumberFormatException nfe) {
|
||||
log.warning("'" + key + "' must be a numeric value " +
|
||||
"[value=" + valstr + ", error=" + nfe + "].");
|
||||
log.warning("'" + key + "' must be a numeric value", "value", valstr, "error", nfe);
|
||||
}
|
||||
}
|
||||
return value;
|
||||
@@ -282,9 +281,9 @@ public class ConfigUtil
|
||||
InputStream in = getStream(path, loader);
|
||||
if (in != null) {
|
||||
log.warning("Buggy classloader: getResources() returned no resources, but " +
|
||||
"getResourceAsStream() returned a resource [path=" + path +
|
||||
", loader=" + StringUtil.shortClassName(loader) +
|
||||
"]. Using the one we could get our hands on.");
|
||||
"getResourceAsStream() returned a resource. Using the one we could " +
|
||||
"get our hands on.", "path", path,
|
||||
"loader", StringUtil.shortClassName(loader));
|
||||
target.load(in);
|
||||
in.close();
|
||||
}
|
||||
@@ -532,8 +531,7 @@ public class ConfigUtil
|
||||
{
|
||||
// make sure the class loader isn't null
|
||||
if (loader == null) {
|
||||
// Log.debug("No loader for get resource request " +
|
||||
// "[path=" + path + "].");
|
||||
// log.debug("No loader for get resource request", "path", path);
|
||||
return null;
|
||||
}
|
||||
// try the path as is
|
||||
@@ -550,8 +548,7 @@ public class ConfigUtil
|
||||
{
|
||||
// make sure the class loader isn't null
|
||||
if (loader == null) {
|
||||
// Log.debug("No loader for get resource request " +
|
||||
// "[path=" + path + "].");
|
||||
// log.debug("No loader for get resource request", "path", path);
|
||||
return null;
|
||||
}
|
||||
// try the path as is
|
||||
|
||||
@@ -126,7 +126,7 @@ public class DebugChords
|
||||
tup.right.invoke();
|
||||
handled = true;
|
||||
} catch (Throwable t) {
|
||||
log.warning("Hook failed [event=" + e + ", hook=" + tup.right + "].", t);
|
||||
log.warning("Hook failed", "event", e, "hook", tup.right, t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,8 +90,7 @@ public class FileUtil
|
||||
// entries that allow us to create our directories first
|
||||
if (entry.isDirectory()) {
|
||||
if (!efile.exists() && !efile.mkdir()) {
|
||||
log.warning("Failed to create jar entry path [jar=" + jar +
|
||||
", entry=" + entry + "].");
|
||||
log.warning("Failed to create jar entry path", "jar", jar, "entry", entry);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@@ -100,8 +99,7 @@ public class FileUtil
|
||||
// prior to getting down and funky
|
||||
File parent = new File(efile.getParent());
|
||||
if (!parent.exists() && !parent.mkdirs()) {
|
||||
log.warning("Failed to create jar entry parent [jar=" + jar +
|
||||
", parent=" + parent + "].");
|
||||
log.warning("Failed to create jar entry parent", "jar", jar, "parent", parent);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -112,8 +110,7 @@ public class FileUtil
|
||||
jin = jar.getInputStream(entry);
|
||||
IOUtils.copy(jin, fout);
|
||||
} catch (Exception e) {
|
||||
log.warning("Failure unpacking [jar=" + jar +
|
||||
", entry=" + efile + ", error=" + e + "].");
|
||||
log.warning("Failure unpacking", "jar", jar, "entry", efile, "error", e);
|
||||
failure = true;
|
||||
} finally {
|
||||
StreamUtil.close(jin);
|
||||
@@ -124,8 +121,7 @@ public class FileUtil
|
||||
try {
|
||||
jar.close();
|
||||
} catch (Exception e) {
|
||||
log.warning("Failed to close jar file [jar=" + jar +
|
||||
", error=" + e + "].");
|
||||
log.warning("Failed to close jar file", "jar", jar, "error", e);
|
||||
}
|
||||
|
||||
return !failure;
|
||||
|
||||
@@ -275,8 +275,8 @@ public abstract class Interval
|
||||
try {
|
||||
ival._runQueue.postRunnable(_runner);
|
||||
} catch (Exception e) {
|
||||
log.warning("Failed to execute interval on run-queue " +
|
||||
"[queue=" + ival._runQueue + ", interval=" + ival + "].", e);
|
||||
log.warning("Failed to execute interval on run-queue", "queue", ival._runQueue,
|
||||
"interval", ival, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ public class Invoker extends LoopingThread
|
||||
didInvokeUnit(unit, start);
|
||||
|
||||
} catch (Throwable t) {
|
||||
log.warning("Invocation unit failed [unit=" + unit + "].", t);
|
||||
log.warning("Invocation unit failed", "unit", unit, t);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ public class PrefsConfig extends Config
|
||||
_prefs = Preferences.userRoot().node(path);
|
||||
} catch (AccessControlException ace) {
|
||||
// security manager won't let us access prefs, no problem!
|
||||
log.info("Can't access preferences [path=" + path + "].");
|
||||
log.info("Can't access preferences", "path", path);
|
||||
_prefs = new NullPreferences();
|
||||
}
|
||||
}
|
||||
@@ -72,7 +72,7 @@ public class PrefsConfig extends Config
|
||||
_prefs = Preferences.userRoot().node(path);
|
||||
} catch (AccessControlException ace) {
|
||||
// security manager won't let us access prefs, no problem!
|
||||
log.info("Can't access preferences [path=" + path + "].");
|
||||
log.info("Can't access preferences", "path", path);
|
||||
_prefs = new NullPreferences();
|
||||
}
|
||||
}
|
||||
@@ -279,7 +279,7 @@ public class PrefsConfig extends Config
|
||||
keys.add(key);
|
||||
}
|
||||
} catch (BackingStoreException bse) {
|
||||
log.warning("Unable to enumerate preferences keys [error=" + bse + "].");
|
||||
log.warning("Unable to enumerate preferences keys", "error", bse);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -72,9 +72,8 @@ public class RunAnywhere
|
||||
if (stamp < _lastStamp) {
|
||||
// only warn once per time anomaly
|
||||
if (stamp > _lastWarning) {
|
||||
log.warning("Someone call Einstein! The clock is " +
|
||||
"running backwards [dt=" +
|
||||
(stamp - _lastStamp) + "].");
|
||||
log.warning("Someone call Einstein! The clock is running backwards",
|
||||
"dt", (stamp - _lastStamp));
|
||||
_lastWarning = _lastStamp;
|
||||
}
|
||||
stamp = _lastStamp;
|
||||
|
||||
@@ -422,7 +422,7 @@ public class DispatcherServlet extends HttpServlet
|
||||
public Object methodException (Class clazz, String method, Exception e)
|
||||
throws Exception
|
||||
{
|
||||
log.warning("Exception [class=" + clazz.getName() + ", method=" + method + "].", e);
|
||||
log.warning("Exception", "class", clazz.getName(), "method", method, e);
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -458,7 +458,7 @@ public class DispatcherServlet extends HttpServlet
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
log.warning("doRequest failed [uri=" + request.getRequestURI() + "].", e);
|
||||
log.warning("doRequest failed", "uri", request.getRequestURI(), e);
|
||||
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -514,7 +514,7 @@ public class DispatcherServlet extends HttpServlet
|
||||
// identifier
|
||||
path = siteId + ":" + path;
|
||||
}
|
||||
// log.info("Loading template [path=" + path + "].");
|
||||
// log.info("Loading template", "path", path);
|
||||
return RuntimeSingleton.getTemplate(path);
|
||||
}
|
||||
|
||||
@@ -545,8 +545,8 @@ public class DispatcherServlet extends HttpServlet
|
||||
|
||||
} catch (IOException ioe) {
|
||||
// the client probably crashed or aborted the connection ungracefully, so use log.info
|
||||
log.info("Failed to write response [uri=" + context.getRequest().getRequestURI() +
|
||||
", error=" + ioe + "]");
|
||||
log.info("Failed to write response", "uri", context.getRequest().getRequestURI(),
|
||||
"error", ioe);
|
||||
|
||||
} finally {
|
||||
if (vw != null) {
|
||||
@@ -587,8 +587,8 @@ public class DispatcherServlet extends HttpServlet
|
||||
// nothing interesting to report
|
||||
|
||||
} catch (Throwable t) {
|
||||
log.warning("Unable to instantiate logic for application [path=" + path +
|
||||
", lclass=" + lclass + "].", t);
|
||||
log.warning("Unable to instantiate logic for application", "path", path,
|
||||
"lclass", lclass, t);
|
||||
}
|
||||
|
||||
// if something failed, use a dummy in it's place so that we don't sit around all day
|
||||
|
||||
@@ -114,9 +114,8 @@ public class SiteJarResourceLoader extends ResourceLoader
|
||||
return (resource.getLastModified() <
|
||||
_loader.getLastModified(skey.siteId));
|
||||
} catch (IOException ioe) {
|
||||
Log.log.warning("Failure obtaining last modified time of " +
|
||||
"site-specific jar file [siteId=" + skey.siteId +
|
||||
", error=" + ioe + "].");
|
||||
Log.log.warning("Failure obtaining last modified time of site-specific jar file",
|
||||
"siteId", skey.siteId, "error", ioe);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -144,9 +143,8 @@ public class SiteJarResourceLoader extends ResourceLoader
|
||||
try {
|
||||
return _loader.getLastModified(skey.siteId);
|
||||
} catch (IOException ioe) {
|
||||
Log.log.warning("Failure obtaining last modified time of " +
|
||||
"site-specific jar file [siteId=" + skey.siteId +
|
||||
", error=" + ioe + "].");
|
||||
Log.log.warning("Failure obtaining last modified time of site-specific jar file",
|
||||
"siteId", skey.siteId, "error", ioe);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class SiteKey
|
||||
try {
|
||||
siteId = Integer.parseInt(path.substring(0, cidx));
|
||||
} catch (Exception e) {
|
||||
log.warning("Invalid site path [path=" + path + "].");
|
||||
log.warning("Invalid site path", "path", path);
|
||||
}
|
||||
this.path = path.substring(cidx+1);
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ public class SimpleParser extends DefaultHandler
|
||||
try {
|
||||
return (val == null) ? -1 : Integer.parseInt(val);
|
||||
} catch (NumberFormatException nfe) {
|
||||
log.warning("Malformed integer value [val=" + val + "].");
|
||||
log.warning("Malformed integer value", "val", val);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user