private void addAccessLog(HttpServer httpServer) { try { String accessLogLocation = serverData.getRootContext().getBean(AccessLogLocationBean.class).getAccessLogLocation(); accessLogLocation = accessLogLocation + "/" + replaceSlash(serverData.getModule().getContext()) + "-access.log"; final AccessLogBuilder builder = new AccessLogBuilder(accessLogLocation); builder.rotatedDaily(); builder.rotationPattern("yyyy-MM-dd"); builder.instrument(httpServer.getServerConfiguration()); } catch (Exception e) { logger.error(InternalErrorCode.SERVER_STARTUP_FAILED_TO_CREATE_ACCESS_LOG.toString() + ": " + e.getMessage()); if (e.getCause() != null) logger.error("CAUSED BY: " + InternalErrorCode.SERVER_STARTUP_FAILED_TO_CREATE_ACCESS_LOG.toString() + ": " + e.getCause().getMessage()); } }
/** * Set up automatic log-file rotation, on a daily basis. * * <p>For example, if the file name specified at * {@linkplain #AccessLogBuilder(File) construction} was * <code>access.log</code>, files will be archived on a daily basis * with names like <code>access-yyyyMMDD.log</code>.</p> */ public AccessLogBuilder rotatedDaily() { return rotationPattern("yyyyMMDD"); }
/** * Set up automatic log-file rotation, on a daily basis. * * <p>For example, if the file name specified at * {@linkplain #AccessLogBuilder(File) construction} was * <code>access.log</code>, files will be archived on a daily basis * with names like <code>access-yyyyMMDD.log</code>.</p> */ public AccessLogBuilder rotatedDaily() { return rotationPattern("yyyyMMDD"); }
/** * Set up automatic log-file rotation, on a daily basis. * * <p>For example, if the file name specified at * {@linkplain #AccessLogBuilder(File) construction} was * <code>access.log</code>, files will be archived on a daily basis * with names like <code>access-yyyyMMDD.log</code>.</p> */ public AccessLogBuilder rotatedDaily() { return rotationPattern("yyyyMMDD"); }
/** * Set up automatic log-file rotation, on a daily basis. * * <p>For example, if the file name specified at * {@linkplain #AccessLogBuilder(File) construction} was * <code>access.log</code>, files will be archived on a daily basis * with names like <code>access-yyyyMMDD.log</code>.</p> */ public AccessLogBuilder rotatedDaily() { return rotationPattern("yyyyMMDD"); }
/** * Set up automatic log-file rotation, on a hourly basis. * * <p>For example, if the file name specified at * {@linkplain #AccessLogBuilder(File) construction} was * <code>access.log</code>, files will be archived on a hourly basis * with names like <code>access-yyyyMMDDhh.log</code>.</p> */ public AccessLogBuilder rotatedHourly() { return rotationPattern("yyyyMMDDhh"); }
/** * Set up automatic log-file rotation, on a daily basis. * * <p>For example, if the file name specified at * {@linkplain #AccessLogBuilder(File) construction} was * <code>access.log</code>, files will be archived on a daily basis * with names like <code>access-yyyyMMDD.log</code>.</p> */ public AccessLogBuilder rotatedDaily() { return rotationPattern("yyyyMMDD"); }
/** * Set up automatic log-file rotation, on a hourly basis. * * <p>For example, if the file name specified at * {@linkplain #AccessLogBuilder(File) construction} was * <code>access.log</code>, files will be archived on a hourly basis * with names like <code>access-yyyyMMDDhh.log</code>.</p> */ public AccessLogBuilder rotatedHourly() { return rotationPattern("yyyyMMDDhh"); }
/** * Set up automatic log-file rotation, on a hourly basis. * * <p>For example, if the file name specified at * {@linkplain #AccessLogBuilder(File) construction} was * <code>access.log</code>, files will be archived on a hourly basis * with names like <code>access-yyyyMMDDhh.log</code>.</p> */ public AccessLogBuilder rotatedHourly() { return rotationPattern("yyyyMMDDhh"); }
/** * Set up automatic log-file rotation, on a daily basis. * * <p>For example, if the file name specified at * {@linkplain #AccessLogBuilder(File) construction} was * <code>access.log</code>, files will be archived on a daily basis * with names like <code>access-yyyyMMDD.log</code>.</p> */ public AccessLogBuilder rotatedDaily() { return rotationPattern("yyyyMMDD"); }
/** * Set up automatic log-file rotation, on a hourly basis. * * <p>For example, if the file name specified at * {@linkplain #AccessLogBuilder(File) construction} was * <code>access.log</code>, files will be archived on a hourly basis * with names like <code>access-yyyyMMDDhh.log</code>.</p> */ public AccessLogBuilder rotatedHourly() { return rotationPattern("yyyyMMDDhh"); }
/** * Set up automatic log-file rotation, on a daily basis. * * <p>For example, if the file name specified at * {@linkplain #AccessLogBuilder(File) construction} was * <code>access.log</code>, files will be archived on a daily basis * with names like <code>access-yyyyMMDD.log</code>.</p> */ public AccessLogBuilder rotatedDaily() { return rotationPattern("yyyyMMDD"); }
/** * Set up automatic log-file rotation, on a hourly basis. * * <p>For example, if the file name specified at * {@linkplain #AccessLogBuilder(File) construction} was * <code>access.log</code>, files will be archived on a hourly basis * with names like <code>access-yyyyMMDDhh.log</code>.</p> */ public AccessLogBuilder rotatedHourly() { return rotationPattern("yyyyMMDDhh"); }
/** * Set up automatic log-file rotation, on a hourly basis. * * <p>For example, if the file name specified at * {@linkplain #AccessLogBuilder(File) construction} was * <code>access.log</code>, files will be archived on a hourly basis * with names like <code>access-yyyyMMDDhh.log</code>.</p> */ public AccessLogBuilder rotatedHourly() { return rotationPattern("yyyyMMDDhh"); }
/** * Set up automatic log-file rotation, on a hourly basis. * * <p>For example, if the file name specified at * {@linkplain #AccessLogBuilder(File) construction} was * <code>access.log</code>, files will be archived on a hourly basis * with names like <code>access-yyyyMMDDhh.log</code>.</p> */ public AccessLogBuilder rotatedHourly() { return rotationPattern("yyyyMMDDhh"); }
/** * Set up automatic log-file rotation, on a hourly basis. * * <p>For example, if the file name specified at * {@linkplain #AccessLogBuilder(File) construction} was * <code>access.log</code>, files will be archived on a hourly basis * with names like <code>access-yyyyMMDDhh.log</code>.</p> */ public AccessLogBuilder rotatedHourly() { return rotationPattern("yyyyMMDDhh"); }
/** * Set up automatic log-file rotation, on a hourly basis. * * <p>For example, if the file name specified at * {@linkplain #AccessLogBuilder(File) construction} was * <code>access.log</code>, files will be archived on a hourly basis * with names like <code>access-yyyyMMDDhh.log</code>.</p> */ public AccessLogBuilder rotatedHourly() { return rotationPattern("yyyyMMDDhh"); }
/** * Set up automatic log-file rotation, on a daily basis. * * <p>For example, if the file name specified at * {@linkplain #AccessLogBuilder(File) construction} was * <code>access.log</code>, files will be archived on a daily basis * with names like <code>access-yyyyMMDD.log</code>.</p> */ public AccessLogBuilder rotatedDaily() { return rotationPattern("yyyyMMDD"); }
/** * Set up automatic log-file rotation, on a hourly basis. * * <p>For example, if the file name specified at * {@linkplain #AccessLogBuilder(File) construction} was * <code>access.log</code>, files will be archived on a hourly basis * with names like <code>access-yyyyMMDDhh.log</code>.</p> */ public AccessLogBuilder rotatedHourly() { return rotationPattern("yyyyMMDDhh"); }
/** * Set up automatic log-file rotation, on a daily basis. * * <p>For example, if the file name specified at * {@linkplain #AccessLogBuilder(File) construction} was * <code>access.log</code>, files will be archived on a daily basis * with names like <code>access-yyyyMMDD.log</code>.</p> */ public AccessLogBuilder rotatedDaily() { return rotationPattern("yyyyMMDD"); }