maximumCacheValidity = CachedDateFormat.getMaximumCacheValidity(pattern); } catch (IllegalArgumentException e) { LogLog.warn( df = new CachedDateFormat(simpleFormat, maximumCacheValidity);
/** * {@inheritDoc} */ public void format(final LoggingEvent event, final StringBuffer output) { synchronized(this) { df.format(event.timeStamp, output); } }
millisecondFormat((int) (now - slotBegin), cache, millisecondStart); findMillisecondStart(now, cache.toString(), formatter);
millisecondFormat(millis, formattedMillis, 0);
/** * Default constructor. * */ public XSLTLayout() { outputStream = new ByteArrayOutputStream(); transformerFactory = (SAXTransformerFactory) TransformerFactory.newInstance(); SimpleDateFormat zdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); zdf.setTimeZone(TimeZone.getTimeZone("UTC")); utcDateFormat = new CachedDateFormat(zdf, 1000); }
millisecondFormat(millis, formattedMillis, 0);
/** * Default constructor. * */ public XSLTLayout() { outputStream = new ByteArrayOutputStream(); transformerFactory = (SAXTransformerFactory) TransformerFactory.newInstance(); SimpleDateFormat zdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); zdf.setTimeZone(TimeZone.getTimeZone("UTC")); utcDateFormat = new CachedDateFormat(zdf, 1000); }
/** * Append formatted date to string buffer. * @param date date * @param toAppendTo buffer to which formatted date is appended. */ public void format(final Date date, final StringBuffer toAppendTo) { synchronized(this) { df.format(date.getTime(), toAppendTo); } } }
maximumCacheValidity = CachedDateFormat.getMaximumCacheValidity(pattern); } catch (IllegalArgumentException e) { LogLog.warn( df = new CachedDateFormat(simpleFormat, maximumCacheValidity);
millisecondFormat((int) (now - slotBegin), cache, millisecondStart); findMillisecondStart(now, cache.toString(), formatter);
millisecondFormat(millis, formattedMillis, 0);
/** * Default constructor. * */ public XSLTLayout() { outputStream = new ByteArrayOutputStream(); transformerFactory = (SAXTransformerFactory) TransformerFactory.newInstance(); SimpleDateFormat zdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); zdf.setTimeZone(TimeZone.getTimeZone("UTC")); utcDateFormat = new CachedDateFormat(zdf, 1000); }
/** * Formats a Date into a date/time string. * * @param date the date to format. * @param sbuf the string buffer to write to. * @param fieldPosition remains untouched. * @return the formatted time string. */ public StringBuffer format( Date date, StringBuffer sbuf, FieldPosition fieldPosition) { format(date.getTime(), sbuf); return sbuf; }
maximumCacheValidity = CachedDateFormat.getMaximumCacheValidity(pattern); } catch (IllegalArgumentException e) { LogLog.warn( df = new CachedDateFormat(simpleFormat, maximumCacheValidity);
millisecondFormat((int) (now - slotBegin), cache, millisecondStart); findMillisecondStart(now, cache.toString(), formatter);
millisecondFormat(millis, formattedMillis, 0);
/** * Default constructor. * */ public XSLTLayout() { outputStream = new ByteArrayOutputStream(); transformerFactory = (SAXTransformerFactory) TransformerFactory.newInstance(); SimpleDateFormat zdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); zdf.setTimeZone(TimeZone.getTimeZone("UTC")); utcDateFormat = new CachedDateFormat(zdf, 1000); }
/** * {@inheritDoc} */ public void format(final LoggingEvent event, final StringBuffer output) { synchronized(this) { df.format(event.timeStamp, output); } }
maximumCacheValidity = CachedDateFormat.getMaximumCacheValidity(pattern); } catch (IllegalArgumentException e) { LogLog.warn( df = new CachedDateFormat(simpleFormat, maximumCacheValidity);
millisecondFormat((int) (now - slotBegin), cache, millisecondStart); findMillisecondStart(now, cache.toString(), formatter);