Esempio 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;
        }
Esempio 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;
        }
Esempio 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;
        }
Esempio 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));
        }
Esempio n. 5
0
 public LoggerFactory(StrategyMode strategyMode, LogConfiguration logConfig, RollingInterval rollingInterval)
 {
     this._logConfig       = logConfig;
     this._logPath         = GetLogPath(strategyMode, logConfig);
     this._rollingInterval = rollingInterval;
 }