Replies

adrian
30 Apr 2013, 12:19

RE: RE:
hichem said:
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

adrian
30 Apr 2013, 12:18

RE:
cAlgo_Fanatic said:

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.

CTRL + C, CTRL + V is not working on my side


@adrian

adrian
01 Feb 2013, 01:11

Could you please provide an example of implementation

It seems like it was implemented already, but i'm having dificulties making it to work.

Could you please provide a full simple example on how it can be used to retreive ask,bid,volume,L2

thanks


@adrian