Search in sources :

Example 1 with DateCache

use of org.eclipse.jetty.util.DateCache in project i2p.i2p by i2p.

the class I2PRequestLog method doStart.

/* ------------------------------------------------------------ */
protected void doStart() throws Exception {
    if (_logDateFormat != null) {
        _logDateCache = new DateCache(_logDateFormat, _logLocale, _logTimeZone);
    }
    if (_filename != null) {
        _fileOut = new RolloverFileOutputStream(_filename, _append, _retainDays, TimeZone.getTimeZone(_logTimeZone), _filenameDateFormat, null);
        _closeOut = true;
        Log.getLogger((String) null).info("Opened " + getDatedFilename());
    } else
        _fileOut = System.err;
    _out = _fileOut;
    if (_ignorePaths != null && _ignorePaths.length > 0) {
        _ignorePathMap = new PathMap<String>();
        for (int i = 0; i < _ignorePaths.length; i++) _ignorePathMap.put(_ignorePaths[i], _ignorePaths[i]);
    } else
        _ignorePathMap = null;
    _writer = new OutputStreamWriter(_out, "UTF-8");
    _buffers = new ArrayList<Utf8StringBuilder>();
    _copy = new char[1024];
    super.doStart();
}
Also used : Utf8StringBuilder(org.eclipse.jetty.util.Utf8StringBuilder) OutputStreamWriter(java.io.OutputStreamWriter) RolloverFileOutputStream(org.eclipse.jetty.util.RolloverFileOutputStream) DateCache(org.eclipse.jetty.util.DateCache)

Aggregations

OutputStreamWriter (java.io.OutputStreamWriter)1 DateCache (org.eclipse.jetty.util.DateCache)1 RolloverFileOutputStream (org.eclipse.jetty.util.RolloverFileOutputStream)1 Utf8StringBuilder (org.eclipse.jetty.util.Utf8StringBuilder)1