protected void closeWriter() { writerLock.writeLock().lock(); try { if (writer == null) return; writer.write(getFormatter().getTail(this)); writer.flush(); writer.close(); writer = null; date = ""; } catch (Exception e) { reportError(null, e, ErrorManager.CLOSE_FAILURE); } finally { writerLock.writeLock().unlock(); } }
(encoding != null) ? new OutputStreamWriter(os, encoding) : new OutputStreamWriter(os), false); writer.write(getFormatter().getHead(this)); } catch (Exception e) { reportError(null, e, ErrorManager.OPEN_FAILURE);
result = getFormatter().format(record); } catch (Exception e) { reportError(null, e, ErrorManager.FORMAT_FAILURE);
protected void closeWriter() { writerLock.writeLock().lock(); try { if (writer == null) return; writer.write(getFormatter().getTail(this)); writer.flush(); writer.close(); writer = null; date = ""; } catch (Exception e) { reportError(null, e, ErrorManager.CLOSE_FAILURE); } finally { writerLock.writeLock().unlock(); } }
protected void closeWriter() { writerLock.writeLock().lock(); try { if (writer == null) return; writer.write(getFormatter().getTail(this)); writer.flush(); writer.close(); writer = null; date = ""; } catch (Exception e) { reportError(null, e, ErrorManager.CLOSE_FAILURE); } finally { writerLock.writeLock().unlock(); } }
protected void closeWriter() { writerLock.writeLock().lock(); try { if (writer == null) return; writer.write(getFormatter().getTail(this)); writer.flush(); writer.close(); writer = null; date = ""; } catch (Exception e) { reportError(null, e, ErrorManager.CLOSE_FAILURE); } finally { writerLock.writeLock().unlock(); } }
protected void closeWriter() { writerLock.writeLock().lock(); try { if (writer == null) { return; } writer.write(getFormatter().getTail(this)); writer.flush(); writer.close(); writer = null; date = ""; } catch (Exception e) { reportError(null, e, ErrorManager.CLOSE_FAILURE); } finally { writerLock.writeLock().unlock(); } }
protected void closeWriter() { writerLock.writeLock().lock(); try { if (writer == null) return; writer.write(getFormatter().getTail(this)); writer.flush(); writer.close(); writer = null; date = ""; } catch (Exception e) { reportError(null, e, ErrorManager.CLOSE_FAILURE); } finally { writerLock.writeLock().unlock(); } }
protected void closeWriter() { writerLock.writeLock().lock(); try { if (writer == null) return; writer.write(getFormatter().getTail(this)); writer.flush(); writer.close(); writer = null; date = ""; } catch (Exception e) { reportError(null, e, ErrorManager.CLOSE_FAILURE); } finally { writerLock.writeLock().unlock(); } }
protected void closeWriter() { writerLock.writeLock().lock(); try { if (writer == null) return; writer.write(getFormatter().getTail(this)); writer.flush(); writer.close(); writer = null; date = ""; } catch (Exception e) { reportError(null, e, ErrorManager.CLOSE_FAILURE); } finally { writerLock.writeLock().unlock(); } }
protected void closeWriter() { writerLock.writeLock().lock(); try { if (writer == null) { return; } writer.write(getFormatter().getTail(this)); writer.flush(); writer.close(); writer = null; date = ""; } catch (Exception e) { reportError(null, e, ErrorManager.CLOSE_FAILURE); } finally { writerLock.writeLock().unlock(); } }
protected void closeWriter() { writerLock.writeLock().lock(); try { if (writer == null) { return; } writer.write(getFormatter().getTail(this)); writer.flush(); writer.close(); writer = null; date = ""; } catch (Exception e) { reportError(null, e, ErrorManager.CLOSE_FAILURE); } finally { writerLock.writeLock().unlock(); } }
protected void openWriter() { // Create the directory if necessary File dir = new File(directory); dir.mkdirs(); // Open the current log file writerLock.writeLock().lock(); try { String pathname = dir.getAbsolutePath() + File.separator + prefix + (rotatable ? date : "") + suffix; String encoding = getEncoding(); FileOutputStream fos = new FileOutputStream(pathname, true); OutputStream os = bufferSize>0?new BufferedOutputStream(fos,bufferSize):fos; writer = new PrintWriter( (encoding != null) ? new OutputStreamWriter(os, encoding) : new OutputStreamWriter(os), false); writer.write(getFormatter().getHead(this)); } catch (Exception e) { reportError(null, e, ErrorManager.OPEN_FAILURE); writer = null; } finally { writerLock.writeLock().unlock(); } }
protected void openWriter() { // Create the directory if necessary File dir = new File(directory); dir.mkdirs(); // Open the current log file writerLock.writeLock().lock(); try { String pathname = dir.getAbsolutePath() + File.separator + prefix + (rotatable ? date : "") + suffix; String encoding = getEncoding(); FileOutputStream fos = new FileOutputStream(pathname, true); OutputStream os = bufferSize>0?new BufferedOutputStream(fos,bufferSize):fos; writer = new PrintWriter( (encoding != null) ? new OutputStreamWriter(os, encoding) : new OutputStreamWriter(os), false); writer.write(getFormatter().getHead(this)); } catch (Exception e) { reportError(null, e, ErrorManager.OPEN_FAILURE); writer = null; } finally { writerLock.writeLock().unlock(); } }
protected void openWriter() { // Create the directory if necessary File dir = new File(directory); dir.mkdirs(); // Open the current log file writerLock.writeLock().lock(); try { String pathname = dir.getAbsolutePath() + File.separator + prefix + (rotatable ? date : "") + suffix; String encoding = getEncoding(); FileOutputStream fos = new FileOutputStream(pathname, true); OutputStream os = bufferSize>0?new BufferedOutputStream(fos,bufferSize):fos; writer = new PrintWriter( (encoding != null) ? new OutputStreamWriter(os, encoding) : new OutputStreamWriter(os), false); writer.write(getFormatter().getHead(this)); } catch (Exception e) { reportError(null, e, ErrorManager.OPEN_FAILURE); writer = null; } finally { writerLock.writeLock().unlock(); } }
(encoding != null) ? new OutputStreamWriter(os, encoding) : new OutputStreamWriter(os), false); writer.write(getFormatter().getHead(this)); } catch (Exception e) { reportError(null, e, ErrorManager.OPEN_FAILURE);
(encoding != null) ? new OutputStreamWriter(os, encoding) : new OutputStreamWriter(os), false); writer.write(getFormatter().getHead(this)); } catch (Exception e) { reportError(null, e, ErrorManager.OPEN_FAILURE);
(encoding != null) ? new OutputStreamWriter(os, encoding) : new OutputStreamWriter(os), false); writer.write(getFormatter().getHead(this)); } catch (Exception e) { reportError(null, e, ErrorManager.OPEN_FAILURE);
(encoding != null) ? new OutputStreamWriter(os, encoding) : new OutputStreamWriter(os), false); writer.write(getFormatter().getHead(this)); } catch (Exception e) { reportError(null, e, ErrorManager.OPEN_FAILURE);
(encoding != null) ? new OutputStreamWriter(os, encoding) : new OutputStreamWriter(os), false); writer.write(getFormatter().getHead(this)); } catch (Exception e) { reportError(null, e, ErrorManager.OPEN_FAILURE);