133 public boolean deferDiagnostics; |
133 public boolean deferDiagnostics; |
134 public Queue<JCDiagnostic> deferredDiagnostics = new ListBuffer<JCDiagnostic>(); |
134 public Queue<JCDiagnostic> deferredDiagnostics = new ListBuffer<JCDiagnostic>(); |
135 |
135 |
136 /** Construct a log with given I/O redirections. |
136 /** Construct a log with given I/O redirections. |
137 */ |
137 */ |
138 @Deprecated |
|
139 protected Log(Context context, PrintWriter errWriter, PrintWriter warnWriter, PrintWriter noticeWriter) { |
138 protected Log(Context context, PrintWriter errWriter, PrintWriter warnWriter, PrintWriter noticeWriter) { |
140 super(JCDiagnostic.Factory.instance(context)); |
139 super(JCDiagnostic.Factory.instance(context)); |
141 context.put(logKey, this); |
140 context.put(logKey, this); |
142 this.errWriter = errWriter; |
141 this.errWriter = errWriter; |
143 this.warnWriter = warnWriter; |
142 this.warnWriter = warnWriter; |
292 } |
291 } |
293 |
292 |
294 public void setWriters(PrintWriter pw) { |
293 public void setWriters(PrintWriter pw) { |
295 pw.getClass(); |
294 pw.getClass(); |
296 noticeWriter = warnWriter = errWriter = pw; |
295 noticeWriter = warnWriter = errWriter = pw; |
|
296 } |
|
297 |
|
298 public void setWriters(Log other) { |
|
299 this.noticeWriter = other.noticeWriter; |
|
300 this.warnWriter = other.warnWriter; |
|
301 this.errWriter = other.errWriter; |
297 } |
302 } |
298 |
303 |
299 /** Flush the logs |
304 /** Flush the logs |
300 */ |
305 */ |
301 public void flush() { |
306 public void flush() { |