Ejemplo n.º 1
0
        public LoggerFactory(StrategyMode strategyMode, string logConfigFileName, RollingInterval rollingInterval)
        {
            var config = ReadConfig(GetConfigPath(), logConfigFileName);

            this._logConfig       = JsonConvert.DeserializeObject <LogConfiguration>(config);
            this._logPath         = GetLogPath(strategyMode, this._logConfig);
            this._rollingInterval = rollingInterval;
        }
Ejemplo n.º 2
0
        public LoggerFactory(StrategyMode strategyMode, LogConfiguration logConfig, RollingInterval rollingInterval, string identifierPlaceHolder, string searchStringTemplate, List <string> indentifierValues)
        {
            this._logConfig       = logConfig;
            this._logPath         = GetLogPath(strategyMode, logConfig);
            this._rollingInterval = rollingInterval;

            this._identifierPlaceHolder = identifierPlaceHolder;
            this._searchStringTemplate  = searchStringTemplate;
            this._indentifierValues     = indentifierValues;
        }
Ejemplo n.º 3
0
        public LoggerFactory(StrategyMode strategyMode, string logConfigFileName, RollingInterval rollingInterval, string identifierPlaceHolder, string searchStringTemplate, List <string> indentifierValues)
        {
            var config = ReadConfig(GetConfigPath(), logConfigFileName);

            this._logConfig       = JsonConvert.DeserializeObject <LogConfiguration>(config);
            this._logPath         = GetLogPath(strategyMode, this._logConfig);
            this._rollingInterval = rollingInterval;

            this._identifierPlaceHolder = identifierPlaceHolder;
            this._searchStringTemplate  = searchStringTemplate;
            this._indentifierValues     = indentifierValues;
        }
Ejemplo n.º 4
0
        private string GetLogPath(StrategyMode strategyMode, LogConfiguration logConfig)
        {
            var logFile = strategyMode == StrategyMode.Live ? logConfig.LiveTradingLogFile :logConfig.BacktestLogFile;

            return(Path.Combine(logConfig.Path, logFile));
        }
Ejemplo n.º 5
0
 public LoggerFactory(StrategyMode strategyMode, LogConfiguration logConfig, RollingInterval rollingInterval)
 {
     this._logConfig       = logConfig;
     this._logPath         = GetLogPath(strategyMode, logConfig);
     this._rollingInterval = rollingInterval;
 }