Close the currently open log file writer.
()
| 304 | * Close the currently open log file writer. |
| 305 | */ |
| 306 | protected void closeWriter() { |
| 307 | |
| 308 | writerLock.writeLock().lock(); |
| 309 | try { |
| 310 | if (writer == null) { |
| 311 | return; |
| 312 | } |
| 313 | writer.write(getFormatter().getTail(this)); |
| 314 | writer.flush(); |
| 315 | writer.close(); |
| 316 | writer = null; |
| 317 | date = null; |
| 318 | } catch (Exception e) { |
| 319 | reportError(null, e, ErrorManager.CLOSE_FAILURE); |
| 320 | } finally { |
| 321 | writerLock.writeLock().unlock(); |
| 322 | } |
| 323 | } |
| 324 | |
| 325 | |
| 326 | /** |