log errors do not fit in one line on the log tab, where is the actual log file located?
log errors do not fit in one line on the log tab, where is the actual log file located?
26 Apr 2013, 09:21
log errors do not fit in one line on the log tab, where is the actual log file located?
Replies
hichem
26 Apr 2013, 15:24
RE:
log errors do not fit in one line on the log tab, where is the actual log file located?
Here is how to copy the Print() output to a text log file
First include System.IO
using System.IO;
Then decalre :
StreamWriter FileWriter ;
Then override the Print Method like this
protected new void Print(object value) { if(FileWriter == null) { var desktopFolder = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);//getting location of user's Desktop folder var filePath = Path.Combine(desktopFolder, "log.txt"); FileWriter = File.AppendText(filePath); FileWriter.AutoFlush = true; } FileWriter.WriteLine(value); base.Print(value); }
then clean in OnStop
protected override void OnStop() { FileWriter.Close(); }
@hichem
adrian
30 Apr 2013, 12:19
RE: RE:
adrian said:log errors do not fit in one line on the log tab, where is the actual log file located?
Here is how to copy the Print() output to a text log file
First include System.IO
using System.IO;Then decalre :
StreamWriter FileWriter ;Then override the Print Method like this
protected new void Print(object value) { if(FileWriter == null) { var desktopFolder = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);//getting location of user's Desktop folder var filePath = Path.Combine(desktopFolder, "log.txt"); FileWriter = File.AppendText(filePath); FileWriter.AutoFlush = true; } FileWriter.WriteLine(value); base.Print(value); }
then clean in OnStop
protected override void OnStop() { FileWriter.Close(); }
Great solution, thanks
@adrian
cAlgo_Fanatic
26 Apr 2013, 15:01
You can copy the line (select the lline and press CTR + C) and paste it in a text editor like Notepad to see the whole error message. We are aware of this issue. There is no log file.
@cAlgo_Fanatic