/// <summary> Constructs a StreamMsgLogger that uses 'outstr' as the 'out' stream, /// and 'errstr' as the 'err' stream. Note that 'outstr' and 'errstr' can /// be System.out and System.err. /// </summary> /// <param name="outstr">Where to print simple strings and LOG and INFO messages. /// </param> /// <param name="errstr">Where to print WARNING and ERROR messages /// </param> /// <param name="lw">The line width to use in formatting /// </param> protected StreamMsgLogger(Stream outstr, Stream errstr, int lw) { var temp_writer = new StreamWriter(outstr, System.Text.Encoding.UTF8); temp_writer.AutoFlush = true; out_Renamed = temp_writer; var temp_writer2 = new StreamWriter(errstr, System.Text.Encoding.UTF8); temp_writer2.AutoFlush = true; err = temp_writer2; mp = new MsgPrinter(lw); }
/// <summary> Constructs a StreamMsgLogger that uses 'outstr' as the 'out' stream, /// and 'errstr' as the 'err' stream. Note that 'outstr' and 'errstr' can /// be System.out and System.err. /// </summary> /// <param name="outstr">Where to print simple strings and LOG and INFO messages. /// </param> /// <param name="errstr">Where to print WARNING and ERROR messages /// </param> /// <param name="lw">The line width to use in formatting /// </param> protected StreamMsgLogger(StreamWriter outstr, StreamWriter errstr, int lw) { var temp_writer = new StreamWriter(outstr.BaseStream, outstr.Encoding); temp_writer.AutoFlush = true; out_Renamed = temp_writer; var temp_writer2 = new StreamWriter(errstr.BaseStream, errstr.Encoding); temp_writer2.AutoFlush = true; err = temp_writer2; mp = new MsgPrinter(lw); }
/// <summary> Constructs a StreamMsgLogger that uses 'outstr' as the 'out' stream, /// and 'errstr' as the 'err' stream. Note that 'outstr' and 'errstr' can /// be System.out and System.err. /// /// </summary> /// <param name="outstr">Where to print simple strings and LOG and INFO messages. /// /// </param> /// <param name="errstr">Where to print WARNING and ERROR messages /// /// </param> /// <param name="lw">The line width to use in formatting /// /// /// /// </param> public StreamMsgLogger(System.IO.Stream outstr, System.IO.Stream errstr, int lw) { System.IO.StreamWriter temp_writer; temp_writer = new System.IO.StreamWriter(outstr, System.Text.Encoding.Default); temp_writer.AutoFlush = true; out_Renamed = temp_writer; System.IO.StreamWriter temp_writer2; temp_writer2 = new System.IO.StreamWriter(errstr, System.Text.Encoding.Default); temp_writer2.AutoFlush = true; err = temp_writer2; mp = new MsgPrinter(lw); }
/// <summary> Constructs a StreamMsgLogger that uses 'outstr' as the 'out' stream, /// and 'errstr' as the 'err' stream. Note that 'outstr' and 'errstr' can /// be System.out and System.err. /// /// </summary> /// <param name="outstr">Where to print simple strings and LOG and INFO messages. /// /// </param> /// <param name="errstr">Where to print WARNING and ERROR messages /// /// </param> /// <param name="lw">The line width to use in formatting /// /// /// /// </param> //UPGRADE_ISSUE: Class hierarchy differences between 'java.io.Writer' and 'System.IO.StreamWriter' may cause compilation errors. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1186'" public StreamMsgLogger(System.IO.StreamWriter outstr, System.IO.StreamWriter errstr, int lw) { System.IO.StreamWriter temp_writer; temp_writer = new System.IO.StreamWriter(outstr.BaseStream, outstr.Encoding); temp_writer.AutoFlush = true; out_Renamed = temp_writer; System.IO.StreamWriter temp_writer2; temp_writer2 = new System.IO.StreamWriter(errstr.BaseStream, errstr.Encoding); temp_writer2.AutoFlush = true; err = temp_writer2; mp = new MsgPrinter(lw); }