コード例 #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;
        }
コード例 #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;
        }
コード例 #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;
        }
コード例 #4
0
        private string GetLogPath(StrategyMode strategyMode, LogConfiguration logConfig)
        {
            var logFile = strategyMode == StrategyMode.Live ? logConfig.LiveTradingLogFile :logConfig.BacktestLogFile;

            return(Path.Combine(logConfig.Path, logFile));
        }
コード例 #5
0
 public LoggerFactory(StrategyMode strategyMode, LogConfiguration logConfig, RollingInterval rollingInterval)
 {
     this._logConfig       = logConfig;
     this._logPath         = GetLogPath(strategyMode, logConfig);
     this._rollingInterval = rollingInterval;
 }