if (isEnabled(event.level())) { final String[] messageArgsStr = new String[messageArgs.length]; for (int i = 0; i < messageArgs.length; i++) { messageArgsStr[i] = formatInstance(messageArgs[i]);
textSB.append(instance.toString()); } else if (instance instanceof Response.StatusType) { textSB.append(formatStatusInfo((Response.StatusType) instance)); } else { textSB.append('['); formatInstance(instance, textSB); if (instance.getClass().isAnnotationPresent(Priority.class)) { textSB.append(" #").append(instance.getClass().getAnnotation(Priority.class).value()); formatResponse(((WebApplicationException) instance).getResponse(), textSB); } else if (instance instanceof Response) { formatResponse(((Response) instance), textSB);
@Override public void logDuration(final Event event, final long fromTimestamp, final Object... args) { if (isEnabled(event.level())) { final long toTimestamp; if (fromTimestamp == -1) { toTimestamp = -1; } else { toTimestamp = System.nanoTime(); } long duration = 0; if ((fromTimestamp != -1) && (toTimestamp != -1)) { duration = toTimestamp - fromTimestamp; } logImpl(event, duration, args); } }
if (isEnabled(event.level())) { final String[] messageArgsStr = new String[messageArgs.length]; for (int i = 0; i < messageArgs.length; i++) { messageArgsStr[i] = formatInstance(messageArgs[i]);
if (isEnabled(event.level())) { final String[] messageArgsStr = new String[messageArgs.length]; for (int i = 0; i < messageArgs.length; i++) { messageArgsStr[i] = formatInstance(messageArgs[i]);
if (isEnabled(event.level())) { final String[] messageArgsStr = new String[messageArgs.length]; for (int i = 0; i < messageArgs.length; i++) { messageArgsStr[i] = formatInstance(messageArgs[i]);
if (isEnabled(event.level())) { final String[] messageArgsStr = new String[messageArgs.length]; for (int i = 0; i < messageArgs.length; i++) { messageArgsStr[i] = formatInstance(messageArgs[i]);
if (isEnabled(event.level())) { final String[] messageArgsStr = new String[messageArgs.length]; for (int i = 0; i < messageArgs.length; i++) { messageArgsStr[i] = formatInstance(messageArgs[i]);
textSB.append(instance.toString()); } else if (instance instanceof Response.StatusType) { textSB.append(formatStatusInfo((Response.StatusType) instance)); } else { textSB.append('['); formatInstance(instance, textSB); if (instance.getClass().isAnnotationPresent(Priority.class)) { textSB.append(" #").append(instance.getClass().getAnnotation(Priority.class).value()); formatResponse(((WebApplicationException) instance).getResponse(), textSB); } else if (instance instanceof Response) { formatResponse(((Response) instance), textSB);
textSB.append(instance.toString()); } else if (instance instanceof Response.StatusType) { textSB.append(formatStatusInfo((Response.StatusType) instance)); } else { textSB.append('['); formatInstance(instance, textSB); if (instance.getClass().isAnnotationPresent(Priority.class)) { textSB.append(" #").append(instance.getClass().getAnnotation(Priority.class).value()); formatResponse(((WebApplicationException) instance).getResponse(), textSB); } else if (instance instanceof Response) { formatResponse(((Response) instance), textSB);
textSB.append(instance.toString()); } else if (instance instanceof Response.StatusType) { textSB.append(formatStatusInfo((Response.StatusType) instance)); } else { textSB.append('['); formatInstance(instance, textSB); if (instance.getClass().isAnnotationPresent(Priority.class)) { textSB.append(" #").append(instance.getClass().getAnnotation(Priority.class).value()); formatResponse(((WebApplicationException) instance).getResponse(), textSB); } else if (instance instanceof Response) { formatResponse(((Response) instance), textSB);
textSB.append(instance.toString()); } else if (instance instanceof Response.StatusType) { textSB.append(formatStatusInfo((Response.StatusType) instance)); } else { textSB.append('['); formatInstance(instance, textSB); if (instance.getClass().isAnnotationPresent(Priority.class)) { textSB.append(" #").append(instance.getClass().getAnnotation(Priority.class).value()); formatResponse(((WebApplicationException) instance).getResponse(), textSB); } else if (instance instanceof Response) { formatResponse(((Response) instance), textSB);
textSB.append(instance.toString()); } else if (instance instanceof Response.StatusType) { textSB.append(formatStatusInfo((Response.StatusType) instance)); } else { textSB.append('['); formatInstance(instance, textSB); if (instance.getClass().isAnnotationPresent(Priority.class)) { textSB.append(" #").append(instance.getClass().getAnnotation(Priority.class).value()); formatResponse(((WebApplicationException) instance).getResponse(), textSB); } else if (instance instanceof Response) { formatResponse(((Response) instance), textSB);
/** * Format of response - status code, status family, reason phrase and info about entity. * * @param response response to be formatted * @param textSB Formatted info will be appended to {@code StringBuilder} */ private static void formatResponse(final Response response, final StringBuilder textSB) { textSB.append(" <").append(formatStatusInfo(response.getStatusInfo())).append('|'); if (response.hasEntity()) { formatInstance(response.getEntity(), textSB); } else { textSB.append("-no-entity-"); } textSB.append('>'); }
@Override public void logDuration(final Event event, final long fromTimestamp, final Object... args) { if (isEnabled(event.level())) { final long toTimestamp; if (fromTimestamp == -1) { toTimestamp = -1; } else { toTimestamp = System.nanoTime(); } long duration = 0; if ((fromTimestamp != -1) && (toTimestamp != -1)) { duration = toTimestamp - fromTimestamp; } logImpl(event, duration, args); } }
@Override public void logDuration(final Event event, final long fromTimestamp, final Object... args) { if (isEnabled(event.level())) { final long toTimestamp; if (fromTimestamp == -1) { toTimestamp = -1; } else { toTimestamp = System.nanoTime(); } long duration = 0; if ((fromTimestamp != -1) && (toTimestamp != -1)) { duration = toTimestamp - fromTimestamp; } logImpl(event, duration, args); } }
@Override public void logDuration(final Event event, final long fromTimestamp, final Object... args) { if (isEnabled(event.level())) { final long toTimestamp; if (fromTimestamp == -1) { toTimestamp = -1; } else { toTimestamp = System.nanoTime(); } long duration = 0; if ((fromTimestamp != -1) && (toTimestamp != -1)) { duration = toTimestamp - fromTimestamp; } logImpl(event, duration, args); } }
@Override public void logDuration(final Event event, final long fromTimestamp, final Object... args) { if (isEnabled(event.level())) { final long toTimestamp; if (fromTimestamp == -1) { toTimestamp = -1; } else { toTimestamp = System.nanoTime(); } long duration = 0; if ((fromTimestamp != -1) && (toTimestamp != -1)) { duration = toTimestamp - fromTimestamp; } logImpl(event, duration, args); } }
@Override public void logDuration(final Event event, final long fromTimestamp, final Object... args) { if (isEnabled(event.level())) { final long toTimestamp; if (fromTimestamp == -1) { toTimestamp = -1; } else { toTimestamp = System.nanoTime(); } long duration = 0; if ((fromTimestamp != -1) && (toTimestamp != -1)) { duration = toTimestamp - fromTimestamp; } logImpl(event, duration, args); } }
/** * Format of response - status code, status family, reason phrase and info about entity. * * @param response response to be formatted * @param textSB Formatted info will be appended to {@code StringBuilder} */ private static void formatResponse(final Response response, final StringBuilder textSB) { textSB.append(" <").append(formatStatusInfo(response.getStatusInfo())).append('|'); if (response.hasEntity()) { formatInstance(response.getEntity(), textSB); } else { textSB.append("-no-entity-"); } textSB.append('>'); }