Commit f586ae8c by wangonghui

添加log日志和添加捕获异常

parent 472a3e7d
...@@ -5,5 +5,8 @@ ...@@ -5,5 +5,8 @@
<add key="vizIpMain" value=""/> <add key="vizIpMain" value=""/>
<add key="vizIpBack" value=""/> <add key="vizIpBack" value=""/>
<add key="leagueId" value="401"/> <add key="leagueId" value="401"/>
<add key="AppID" value="100001"/>
<add key="AppKey" value="ffrw7ilc8i6r3pkzvl"/>
<add key="newUrl" value="http://180.184.78.246:18080/miku/api/open_api/proxy_api/beitai/api/schedule/getdayschedule"/>
</appSettings> </appSettings>
</configuration> </configuration>
\ No newline at end of file
using DevExpress.ClipboardSource.SpreadsheetML; using DevExpress.ClipboardSource.SpreadsheetML;
using DevExpress.Mvvm;
using log4net;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Net.Http;
using System.Security.Policy;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
...@@ -11,24 +15,25 @@ namespace VIZ.TVP.CBA.Module.Common ...@@ -11,24 +15,25 @@ namespace VIZ.TVP.CBA.Module.Common
{ {
public static class JsonHelper public static class JsonHelper
{ {
/// <summary>
/// 日志
/// </summary>
private static readonly ILog Log = LogManager.GetLogger(typeof(JsonHelper));
/// <summary> /// <summary>
/// 根据POST方法请求获取 /// 根据POST方法请求获取
/// </summary> /// </summary>
/// <param name="url"></param> /// <param name="url"></param>
/// <param name="dic"></param> /// <param name="dic"></param>
/// <returns></returns> /// <returns></returns>
public static string Post(string url, Dictionary<string, string> dic) public static string Post(string url, Dictionary<string, string> dic,string key)
{
string result = "";
try
{ {
string result = null;
//try
//{
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url); HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
req.Method = "POST"; req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded"; req.ContentType = "application/x-www-form-urlencoded";
req.Headers.Add("App-Authorization", key);
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
int i = 0; int i = 0;
foreach (var item in dic) foreach (var item in dic)
...@@ -51,15 +56,12 @@ namespace VIZ.TVP.CBA.Module.Common ...@@ -51,15 +56,12 @@ namespace VIZ.TVP.CBA.Module.Common
{ {
result = reader.ReadToEnd(); result = reader.ReadToEnd();
} }
// }
//catch (Exception ex) }
//{ catch(Exception ex)
// log.Error(ex); {
//} Log.Error(ex.Message);
//finally }
//{
// LogRequest(url, result);
//}
return result; return result;
} }
...@@ -73,6 +75,9 @@ namespace VIZ.TVP.CBA.Module.Common ...@@ -73,6 +75,9 @@ namespace VIZ.TVP.CBA.Module.Common
public static string GetResult(string url) public static string GetResult(string url)
{ {
string data = ""; string data = "";
try
{
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url); HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
req.Headers["Accept-Encoding"] = "gzip,deflate"; req.Headers["Accept-Encoding"] = "gzip,deflate";
req.AutomaticDecompression = DecompressionMethods.GZip; req.AutomaticDecompression = DecompressionMethods.GZip;
...@@ -83,6 +88,11 @@ namespace VIZ.TVP.CBA.Module.Common ...@@ -83,6 +88,11 @@ namespace VIZ.TVP.CBA.Module.Common
{ {
data = reader.ReadToEnd(); data = reader.ReadToEnd();
} }
}
catch(Exception ex)
{
Log.Error(ex.Message);
}
return data; return data;
} }
......
...@@ -34,6 +34,34 @@ namespace VIZ.TVP.CBA.Module.Common ...@@ -34,6 +34,34 @@ namespace VIZ.TVP.CBA.Module.Common
} }
/// <summary> /// <summary>
/// 艾果的密钥加密
/// </summary>
/// <param name="appId"></param>
/// <param name="appKey"></param>
/// <returns></returns>
public static string GetKey(string appId,string appKey)
{
int random = new Random().Next(0, 100);
long timeStamp = DateToTicks(DateTime.Now);
string key = Convert.ToBase64String(Encoding.UTF8.GetBytes(string.Format("{0},{1},{2},{3}",appId,appKey,timeStamp,random)));
return key;
}
/// <summary>
/// 获取时间戳
/// </summary>
/// <param name="time"></param>
/// <returns></returns>
public static long DateToTicks(DateTime? time)
{
return ((time.HasValue ? time.Value.Ticks : DateTime.Parse("1990-01-01").Ticks) - 621355968000000000) / 10000;
}
/// <summary>
/// 设置主队和客队球员技术数据统计 /// 设置主队和客队球员技术数据统计
/// </summary> /// </summary>
/// <param name="mainViewModel"></param> /// <param name="mainViewModel"></param>
......
using System; using log4net;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Configuration; using System.Configuration;
using System.IO; using System.IO;
...@@ -11,6 +12,8 @@ namespace VIZ.TVP.CBA.Module ...@@ -11,6 +12,8 @@ namespace VIZ.TVP.CBA.Module
{ {
public static class ConfigManage public static class ConfigManage
{ {
private static ILog Log = LogManager.GetLogger(typeof(ConfigManage));
#region 1.获取当前类库的文件配置 #region 1.获取当前类库的文件配置
public static Configuration InitLogConfig() public static Configuration InitLogConfig()
...@@ -35,8 +38,9 @@ namespace VIZ.TVP.CBA.Module ...@@ -35,8 +38,9 @@ namespace VIZ.TVP.CBA.Module
} }
catch (Exception ex) catch (Exception ex)
{ {
throw new Exception(ex.Message); //throw new Exception(ex.Message);
Log.Error(ex.Message);
return null;
} }
#endregion #endregion
......
...@@ -9,11 +9,17 @@ using VIZ.TVP.CBA.Module.Common; ...@@ -9,11 +9,17 @@ using VIZ.TVP.CBA.Module.Common;
using VIZ.TVP.CBA.Module.DayMatch.Model; using VIZ.TVP.CBA.Module.DayMatch.Model;
using VIZ.TVP.CBA.Module.TempEnum; using VIZ.TVP.CBA.Module.TempEnum;
using VIZ.TVP.CBA.Domain; using VIZ.TVP.CBA.Domain;
using log4net;
namespace VIZ.TVP.CBA.Module.DayMatch.ViewModel namespace VIZ.TVP.CBA.Module.DayMatch.ViewModel
{ {
public class DayMatchViewModel : ViewModelBase public class DayMatchViewModel : ViewModelBase
{ {
/// <summary>
/// 日志
/// </summary>
private static ILog Log= LogManager.GetLogger(typeof(DayMatchViewModel));
public DayMatchViewModel() public DayMatchViewModel()
{ {
...@@ -55,7 +61,7 @@ namespace VIZ.TVP.CBA.Module.DayMatch.ViewModel ...@@ -55,7 +61,7 @@ namespace VIZ.TVP.CBA.Module.DayMatch.ViewModel
/// </summary> /// </summary>
private void BtnMatchDayUpData() private void BtnMatchDayUpData()
{ {
Log.Info("比赛日期上版和数据:"+ CombineMatchData());
ApplicationDomainEx.VizEngineModel.STAGE_START("Default/JRSCBEN", "Data", CombineMatchData()); ApplicationDomainEx.VizEngineModel.STAGE_START("Default/JRSCBEN", "Data", CombineMatchData());
} }
...@@ -115,10 +121,16 @@ namespace VIZ.TVP.CBA.Module.DayMatch.ViewModel ...@@ -115,10 +121,16 @@ namespace VIZ.TVP.CBA.Module.DayMatch.ViewModel
/// </summary> /// </summary>
private void GetSchedule() private void GetSchedule()
{ {
try
{
string date = Convert.ToDateTime(matchDate).ToString("yyyy-MM-dd"); string date = Convert.ToDateTime(matchDate).ToString("yyyy-MM-dd");
var dayschedules = JsonModel.TomorrowMatch_Path(date); var dayschedules = JsonModel.TomorrowMatch_Path(date);
if (dayschedules == null) return;
// matchData.AddRange(dayschedules.dayschedule); // matchData.AddRange(dayschedules.dayschedule);
MatchData = new ObservableCollection<Dayschedule>(); MatchData = new ObservableCollection<Dayschedule>();
...@@ -147,6 +159,11 @@ namespace VIZ.TVP.CBA.Module.DayMatch.ViewModel ...@@ -147,6 +159,11 @@ namespace VIZ.TVP.CBA.Module.DayMatch.ViewModel
MatchData.Add(dayschedule); MatchData.Add(dayschedule);
} }
}
catch(Exception ex)
{
Log.Error(ex.Message);
}
} }
......
...@@ -19,13 +19,14 @@ using VIZ.TVP.CBA.Module.OnAirData; ...@@ -19,13 +19,14 @@ using VIZ.TVP.CBA.Module.OnAirData;
using VIZ.TVP.CBA.Module.SeasonData; using VIZ.TVP.CBA.Module.SeasonData;
using DevExpress.Mvvm.POCO; using DevExpress.Mvvm.POCO;
using System.ComponentModel; using System.ComponentModel;
using log4net;
namespace VIZ.TVP.CBA.Module.PlayerCompare.ViewModel namespace VIZ.TVP.CBA.Module.PlayerCompare.ViewModel
{ {
public class PlayerCompareViewModel : ViewModelBase public class PlayerCompareViewModel : ViewModelBase
{ {
private static ILog Log=LogManager.GetLogger(typeof(PlayerCompareViewModel));
private static PlayerCompareViewModel _createInstance = null; private static PlayerCompareViewModel _createInstance = null;
public static PlayerCompareViewModel CreateInstance public static PlayerCompareViewModel CreateInstance
...@@ -51,49 +52,6 @@ namespace VIZ.TVP.CBA.Module.PlayerCompare.ViewModel ...@@ -51,49 +52,6 @@ namespace VIZ.TVP.CBA.Module.PlayerCompare.ViewModel
}; };
playerComModels = new ObservableCollection<PlayerComModel>(); playerComModels = new ObservableCollection<PlayerComModel>();
//{
// new PlayerComModel()
// {
// //TechStats=TechStats.Goal
// TechStatsName="得分"
// },
// new PlayerComModel()
// {
// // TechStats=TechStats.Rebounds
// TechStatsName="篮板"
// },
// new PlayerComModel()
// {
// // TechStats=TechStats.Assists
// TechStatsName="助攻"
// },
// new PlayerComModel()
// {
// //TechStats=TechStats.Blocks
// TechStatsName="盖帽"
// },
// new PlayerComModel()
// {
// //TechStats=TechStats.Steals
// TechStatsName="抢断"
// },
// new PlayerComModel()
// {
// //TechStats=TechStats.ShootingGoalP
// TechStatsName="投篮命中率"
// },
// new PlayerComModel()
// {
// //TechStats=TechStats.ThreeShootingGoalP
// TechStatsName="三分命中率",
// }
//};
PlayerComModel PlayGoal = new PlayerComModel(); PlayerComModel PlayGoal = new PlayerComModel();
PlayGoal.TechStatsName = "得分"; PlayGoal.TechStatsName = "得分";
...@@ -131,19 +89,15 @@ namespace VIZ.TVP.CBA.Module.PlayerCompare.ViewModel ...@@ -131,19 +89,15 @@ namespace VIZ.TVP.CBA.Module.PlayerCompare.ViewModel
playerComModels.Add(ThreeShootingGoalP); playerComModels.Add(ThreeShootingGoalP);
BtnCommand = new VCommand(BtnCmd); BtnCommand = new VCommand(BtnCmd);
PlayerComCommand = new VCommand(playerComCommand); PlayerComCommand = new VCommand(playerComCommand);
MatchCmd = new VCommand(MatchTechCmd); MatchCmd = new VCommand(MatchTechCmd);
matchDate = DateTime.Today.ToShortDateString(); matchDate = DateTime.Today.ToShortDateString();
GetSchedule(); GetSchedule();
GetSeasonData(); GetSeasonData();
//SetPlayer();
} }
/// <summary> /// <summary>
...@@ -799,6 +753,7 @@ namespace VIZ.TVP.CBA.Module.PlayerCompare.ViewModel ...@@ -799,6 +753,7 @@ namespace VIZ.TVP.CBA.Module.PlayerCompare.ViewModel
} }
else else
{ {
Log.Info("球员对比上版和数据:"+ CombinePlayerCommand());
ApplicationDomainEx.VizEngineModel.STAGE_START("Default/SQY", "dqyData", CombinePlayerCommand()); ApplicationDomainEx.VizEngineModel.STAGE_START("Default/SQY", "dqyData", CombinePlayerCommand());
// CombinePlayerCommand(); // CombinePlayerCommand();
} }
...@@ -884,6 +839,7 @@ namespace VIZ.TVP.CBA.Module.PlayerCompare.ViewModel ...@@ -884,6 +839,7 @@ namespace VIZ.TVP.CBA.Module.PlayerCompare.ViewModel
private void BtnCmd() private void BtnCmd()
{ {
onAirDataModel = JsonModel.OnAirData_Path(ScheduleID); onAirDataModel = JsonModel.OnAirData_Path(ScheduleID);
if (onAirDataModel == null) return;
SetPlayer(false); SetPlayer(false);
SetAData(); SetAData();
SetHData(); SetHData();
...@@ -896,23 +852,27 @@ namespace VIZ.TVP.CBA.Module.PlayerCompare.ViewModel ...@@ -896,23 +852,27 @@ namespace VIZ.TVP.CBA.Module.PlayerCompare.ViewModel
} }
/// <summary> /// <summary>
/// 获取日期类型 /// 根据日期获取赛程
/// </summary> /// </summary>
private void GetSchedule() private void GetSchedule()
{ {
try
{
MatchItems = new ObservableCollection<string>(); MatchItems = new ObservableCollection<string>();
string date = Convert.ToDateTime(matchDate).ToString("yyyy-MM-dd"); string date = Convert.ToDateTime(matchDate).ToString("yyyy-MM-dd");
var dayschedules = JsonModel.TomorrowMatch_Path(date); var dayschedules = JsonModel.TomorrowMatch_Path(date);
if (dayschedules == null) return;
// matchData.AddRange(dayschedules.dayschedule); // matchData.AddRange(dayschedules.dayschedule);
//MatchData = new ObservableCollection<Dayschedule>(); //MatchData = new ObservableCollection<Dayschedule>();
if (dayschedules != null) //if (dayschedules != null)
{ //{
dayschedules.dayschedule = dayschedules.dayschedule.OrderBy(a => Convert.ToDateTime(a.time)).ToList(); dayschedules.dayschedule = dayschedules.dayschedule.OrderBy(a => Convert.ToDateTime(a.time)).ToList();
} // }
SetMatchDict.Clear(); SetMatchDict.Clear();
MatchItems.Clear(); MatchItems.Clear();
...@@ -954,16 +914,27 @@ namespace VIZ.TVP.CBA.Module.PlayerCompare.ViewModel ...@@ -954,16 +914,27 @@ namespace VIZ.TVP.CBA.Module.PlayerCompare.ViewModel
} }
} }
catch (Exception ex)
{
Log.Error(ex.Message);
}
}
/// <summary>
/// 获得赛季球队数据
/// </summary>
private void GetSeasonData() private void GetSeasonData()
{ {
try
{
PlayerSeasonData = JsonModel.PlayerSeasonData_Path(Matchtypeid); PlayerSeasonData = JsonModel.PlayerSeasonData_Path(Matchtypeid);
TeamSeasonData = JsonModel.TeamSeasonData_Path(Matchtypeid); TeamSeasonData = JsonModel.TeamSeasonData_Path(Matchtypeid);
CNAliasPlayerSportsDictionary.Clear(); CNAliasPlayerSportsDictionary.Clear();
if (PlayerSeasonData == null) return;
foreach (var tempSeasonData in PlayerSeasonData.playerstats) foreach (var tempSeasonData in PlayerSeasonData.playerstats)
{ {
Dictionary<string, string> CompareItemToNumber = new Dictionary<string, string>(); Dictionary<string, string> CompareItemToNumber = new Dictionary<string, string>();
...@@ -1007,6 +978,11 @@ namespace VIZ.TVP.CBA.Module.PlayerCompare.ViewModel ...@@ -1007,6 +978,11 @@ namespace VIZ.TVP.CBA.Module.PlayerCompare.ViewModel
} }
} }
catch(Exception ex)
{
Log.Error(ex.Message);
}
}
...@@ -1015,6 +991,8 @@ namespace VIZ.TVP.CBA.Module.PlayerCompare.ViewModel ...@@ -1015,6 +991,8 @@ namespace VIZ.TVP.CBA.Module.PlayerCompare.ViewModel
if (SelectMatchItems == null) return; if (SelectMatchItems == null) return;
ScheduleID = SetMatchDict[SelectMatchItems]; ScheduleID = SetMatchDict[SelectMatchItems];
onAirDataModel = JsonModel.OnAirData_Path(ScheduleID); onAirDataModel = JsonModel.OnAirData_Path(ScheduleID);
if (onAirDataModel == null) return;
if (onAirDataModel != null) if (onAirDataModel != null)
{ {
......
...@@ -10,12 +10,18 @@ using VIZ.TVP.CBA.Module.DayMatch.Model; ...@@ -10,12 +10,18 @@ using VIZ.TVP.CBA.Module.DayMatch.Model;
using VIZ.TVP.CBA.Module.RoundMatch.Model; using VIZ.TVP.CBA.Module.RoundMatch.Model;
using VIZ.TVP.CBA.Module.TempEnum; using VIZ.TVP.CBA.Module.TempEnum;
using VIZ.TVP.CBA.Domain; using VIZ.TVP.CBA.Domain;
using log4net;
namespace VIZ.TVP.CBA.Module.RoundMatch.ViewModel namespace VIZ.TVP.CBA.Module.RoundMatch.ViewModel
{ {
public class RoundMatchViewModel: ViewModelBase public class RoundMatchViewModel: ViewModelBase
{ {
/// <summary>
/// 日志
/// </summary>
private static ILog Log=LogManager.GetLogger(typeof(RoundMatchViewModel));
public RoundMatchViewModel() public RoundMatchViewModel()
{ {
RoundMatchs = new ObservableCollection<int>(); RoundMatchs = new ObservableCollection<int>();
...@@ -153,7 +159,7 @@ namespace VIZ.TVP.CBA.Module.RoundMatch.ViewModel ...@@ -153,7 +159,7 @@ namespace VIZ.TVP.CBA.Module.RoundMatch.ViewModel
private void BtnCmdDataUp() private void BtnCmdDataUp()
{ {
Log.Info("轮次比赛上版信息和数据:" + CombineMatchData());
ApplicationDomainEx.VizEngineModel.STAGE_START("Default/JRSCBEN", "Data", CombineMatchData()); ApplicationDomainEx.VizEngineModel.STAGE_START("Default/JRSCBEN", "Data", CombineMatchData());
} }
...@@ -209,6 +215,8 @@ namespace VIZ.TVP.CBA.Module.RoundMatch.ViewModel ...@@ -209,6 +215,8 @@ namespace VIZ.TVP.CBA.Module.RoundMatch.ViewModel
public void BtnCommand() public void BtnCommand()
{ {
var roundSchedules = JsonModel.GetGameRound_Path(roundMatchItem.ToString()); var roundSchedules = JsonModel.GetGameRound_Path(roundMatchItem.ToString());
if (roundSchedules == null) return;
RoundMatchData = new ObservableCollection<RoundSchedule>(); RoundMatchData = new ObservableCollection<RoundSchedule>();
foreach(var rudData in roundSchedules.schedulelist) foreach(var rudData in roundSchedules.schedulelist)
......
...@@ -17,12 +17,15 @@ using VIZ.TVP.CBA.Module.SeasonData; ...@@ -17,12 +17,15 @@ using VIZ.TVP.CBA.Module.SeasonData;
using VIZ.TVP.CBA.Module.OnAirData; using VIZ.TVP.CBA.Module.OnAirData;
using VIZ.TVP.CBA.Module.PlayerCompare.Model; using VIZ.TVP.CBA.Module.PlayerCompare.Model;
using System.ComponentModel; using System.ComponentModel;
using log4net;
namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel
{ {
public class SinglePlayerViewModel: ViewModelBase public class SinglePlayerViewModel: ViewModelBase
{ {
private static ILog Log= LogManager.GetLogger(typeof(SinglePlayerViewModel));
private static SinglePlayerViewModel _createInstance = null; private static SinglePlayerViewModel _createInstance = null;
public static SinglePlayerViewModel CreateInstance public static SinglePlayerViewModel CreateInstance
...@@ -38,7 +41,6 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel ...@@ -38,7 +41,6 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel
} }
public SinglePlayerViewModel() public SinglePlayerViewModel()
{ {
...@@ -191,9 +193,6 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel ...@@ -191,9 +193,6 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel
} }
} }
private ObservableCollection<int> matchStatsIds; private ObservableCollection<int> matchStatsIds;
public ObservableCollection<int> MatchStatsIds public ObservableCollection<int> MatchStatsIds
...@@ -808,7 +807,9 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel ...@@ -808,7 +807,9 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel
SetData(); SetData();
} }
/// <summary>
/// 单个球员数据
/// </summary>
private void singleCommand() private void singleCommand()
{ {
if(matchStatsId==null) if(matchStatsId==null)
...@@ -822,11 +823,15 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel ...@@ -822,11 +823,15 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel
} }
else else
{ {
Log.Info("单人球员数据:"+ CombineSingleData());
ApplicationDomainEx.VizEngineModel.STAGE_START("Default/DQY", "dqyData", CombineSingleData()); ApplicationDomainEx.VizEngineModel.STAGE_START("Default/DQY", "dqyData", CombineSingleData());
} }
} }
/// <summary>
/// mvp球员数据
/// </summary>
private void mvpCommand() private void mvpCommand()
{ {
if (matchStatsId == null) if (matchStatsId == null)
...@@ -840,17 +845,17 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel ...@@ -840,17 +845,17 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel
} }
else else
{ {
Log.Info("MVP球员数据:"+ CombineSingleData());
ApplicationDomainEx.VizEngineModel.STAGE_START("Default/DQY", "dqyData", CombineSingleData()); ApplicationDomainEx.VizEngineModel.STAGE_START("Default/DQY", "dqyData", CombineSingleData());
} }
} }
private ObservableCollection<string> matchItems;
/// <summary> /// <summary>
/// 下拉框绑定得赛程详细信息 /// 下拉框绑定得赛程详细信息
/// </summary> /// </summary>
private ObservableCollection<string> matchItems;
public ObservableCollection<string> MatchItems public ObservableCollection<string> MatchItems
{ {
get { return matchItems; } get { return matchItems; }
...@@ -858,12 +863,12 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel ...@@ -858,12 +863,12 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel
} }
private string selectMatchItems;
/// <summary> /// <summary>
/// 选中得赛程信息 /// 选中得赛程信息
/// </summary> /// </summary>
private string selectMatchItems;
public string SelectMatchItems public string SelectMatchItems
{ {
get { return selectMatchItems; } get { return selectMatchItems; }
...@@ -875,6 +880,9 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel ...@@ -875,6 +880,9 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel
} }
} }
/// <summary>
///比赛状态
/// </summary>
private string matchStatus; private string matchStatus;
public string MatchStatus public string MatchStatus
...@@ -912,12 +920,15 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel ...@@ -912,12 +920,15 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel
public Dictionary<string, string> SetMatchDict = new Dictionary<string, string>(); public Dictionary<string, string> SetMatchDict = new Dictionary<string, string>();
/// <summary>
/// 设置单个球员相关的信息
/// </summary>
private void SetSingleData() private void SetSingleData()
{ {
if (SelectMatchItems == null) return; if (SelectMatchItems == null) return;
ScheduleID = SetMatchDict[SelectMatchItems]; ScheduleID = SetMatchDict[SelectMatchItems];
onAirDataModel = JsonModel.OnAirData_Path(ScheduleID); onAirDataModel = JsonModel.OnAirData_Path(ScheduleID);
if (onAirDataModel == null) return;
if (onAirDataModel != null) if (onAirDataModel != null)
{ {
...@@ -972,18 +983,22 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel ...@@ -972,18 +983,22 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel
private void GetSchedule() private void GetSchedule()
{ {
try
{
MatchItems = new ObservableCollection<string>(); MatchItems = new ObservableCollection<string>();
string date = Convert.ToDateTime(matchDate).ToString("yyyy-MM-dd"); string date = Convert.ToDateTime(matchDate).ToString("yyyy-MM-dd");
var dayschedules = JsonModel.TomorrowMatch_Path(date); var dayschedules = JsonModel.TomorrowMatch_Path(date);
if (dayschedules == null) return;
// matchData.AddRange(dayschedules.dayschedule); // matchData.AddRange(dayschedules.dayschedule);
//MatchData = new ObservableCollection<Dayschedule>(); //MatchData = new ObservableCollection<Dayschedule>();
if (dayschedules != null) //if (dayschedules != null)
{ //{
dayschedules.dayschedule = dayschedules.dayschedule.OrderBy(a => Convert.ToDateTime(a.time)).ToList(); dayschedules.dayschedule = dayschedules.dayschedule.OrderBy(a => Convert.ToDateTime(a.time)).ToList();
} //}
SetMatchDict.Clear(); SetMatchDict.Clear();
MatchItems.Clear(); MatchItems.Clear();
...@@ -1024,23 +1039,31 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel ...@@ -1024,23 +1039,31 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel
+ "VS" + dayschedule.VisitingTeamName); + "VS" + dayschedule.VisitingTeamName);
} }
}
catch(Exception ex)
{
Log.Error(ex.Message);
} }
}
/// <summary>
/// 获得赛季数据
/// </summary>
private void GetSeasonData() private void GetSeasonData()
{ {
try
{
PlayerSeasonData = JsonModel.PlayerSeasonData_Path(Matchtypeid); PlayerSeasonData = JsonModel.PlayerSeasonData_Path(Matchtypeid);
TeamSeasonData = JsonModel.TeamSeasonData_Path(Matchtypeid); TeamSeasonData = JsonModel.TeamSeasonData_Path(Matchtypeid);
if (PlayerSeasonData == null) return;
CNAliasPlayerSportsDictionary.Clear(); CNAliasPlayerSportsDictionary.Clear();
foreach (var tempSeasonData in PlayerSeasonData.playerstats) foreach (var tempSeasonData in PlayerSeasonData.playerstats)
{ {
...@@ -1085,7 +1108,16 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel ...@@ -1085,7 +1108,16 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel
} }
} }
catch(Exception ex)
{
Log.Error(ex.Message);
}
}
/// <summary>
/// 组装数据
/// </summary>
/// <returns></returns>
private string CombineSingleData() private string CombineSingleData()
{ {
string data = ""; string data = "";
...@@ -1113,18 +1145,23 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel ...@@ -1113,18 +1145,23 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel
return data; return data;
} }
/// <summary>
/// 上MVP球员数据
/// </summary>
/// <returns></returns>
private string CombineMVPData() private string CombineMVPData()
{ {
string data = ""; string data = "";
return data; return data;
} }
/// <summary>
/// 刷新数据
/// </summary>
private void BtnCommand() private void BtnCommand()
{ {
onAirDataModel = JsonModel.OnAirData_Path(ScheduleID); onAirDataModel = JsonModel.OnAirData_Path(ScheduleID);
if (onAirDataModel == null) return;
MvpHomePlayerCompareNumDictionary.Clear(); MvpHomePlayerCompareNumDictionary.Clear();
MvpVisitPlayerCompareNumDictionary.Clear(); MvpVisitPlayerCompareNumDictionary.Clear();
// PlayerItems = new System.Collections.ObjectModel.ObservableCollection<string>(); // PlayerItems = new System.Collections.ObjectModel.ObservableCollection<string>();
...@@ -1245,7 +1282,9 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel ...@@ -1245,7 +1282,9 @@ namespace VIZ.TVP.CBA.Module.SinglePlayer.ViewModel
} }
/// <summary>
/// 设置数据得分
/// </summary>
private void SetData() private void SetData()
{ {
......
...@@ -9,13 +9,20 @@ using VIZ.TVP.CBA.Module.Common; ...@@ -9,13 +9,20 @@ using VIZ.TVP.CBA.Module.Common;
using VIZ.TVP.CBA.Module.DayMatch.Model; using VIZ.TVP.CBA.Module.DayMatch.Model;
using VIZ.TVP.CBA.Module.TeamStandings.Model; using VIZ.TVP.CBA.Module.TeamStandings.Model;
using VIZ.TVP.CBA.Domain; using VIZ.TVP.CBA.Domain;
using log4net;
namespace VIZ.TVP.CBA.Module.TeamStandings.ViewModel namespace VIZ.TVP.CBA.Module.TeamStandings.ViewModel
{ {
public class TeamStandingViewModel: ViewModelBase public class TeamStandingViewModel: ViewModelBase
{ {
/// <summary>
/// 日志
/// </summary>
private static ILog Log= LogManager.GetLogger(typeof(TeamStandingViewModel));
/// <summary>
/// 球队排名初始化排名
/// </summary>
public TeamStandingViewModel() public TeamStandingViewModel()
{ {
//TeamRanksModel = new ObservableCollection<Model.Teamrank>() //TeamRanksModel = new ObservableCollection<Model.Teamrank>()
...@@ -143,7 +150,7 @@ namespace VIZ.TVP.CBA.Module.TeamStandings.ViewModel ...@@ -143,7 +150,7 @@ namespace VIZ.TVP.CBA.Module.TeamStandings.ViewModel
private void BtmCommand() private void BtmCommand()
{ {
var teamStands = JsonModel.TeamScoreData_Path(); var teamStands = JsonModel.TeamScoreData_Path();
if (teamStands == null) return;
TeamRanksModel = new ObservableCollection<Teamrank>(); TeamRanksModel = new ObservableCollection<Teamrank>();
int i = 1; int i = 1;
foreach(var teamRank in teamStands.teamrank) foreach(var teamRank in teamStands.teamrank)
...@@ -174,6 +181,7 @@ namespace VIZ.TVP.CBA.Module.TeamStandings.ViewModel ...@@ -174,6 +181,7 @@ namespace VIZ.TVP.CBA.Module.TeamStandings.ViewModel
{ {
if(TeamRanksModel!=null) if(TeamRanksModel!=null)
{ {
Log.Info("球队排名上版信息和数据:"+ CombineTeamStandingData());
ApplicationDomainEx.VizEngineModel.STAGE_START("Default/JFB", "Data", CombineTeamStandingData()); ApplicationDomainEx.VizEngineModel.STAGE_START("Default/JFB", "Data", CombineTeamStandingData());
} }
} }
......
...@@ -10,15 +10,18 @@ using VIZ.TVP.CBA.Module.TempEnum; ...@@ -10,15 +10,18 @@ using VIZ.TVP.CBA.Module.TempEnum;
namespace VIZ.TVP.CBA.Module.TeamStats.Model namespace VIZ.TVP.CBA.Module.TeamStats.Model
{ {
/// <summary>
/// 技术统计类
/// </summary>
public class MatchStatsNumbers:ViewModelBase public class MatchStatsNumbers:ViewModelBase
{ {
// public string HomeName { get; set; } // public string HomeName { get; set; }
/// <summary>
/// 主队得分
/// </summary>
private string homeScore; private string homeScore;
public string HomeScore public string HomeScore
...@@ -28,7 +31,9 @@ namespace VIZ.TVP.CBA.Module.TeamStats.Model ...@@ -28,7 +31,9 @@ namespace VIZ.TVP.CBA.Module.TeamStats.Model
set { homeScore = value; this.RaisePropertiesChanged(nameof(HomeScore)); } set { homeScore = value; this.RaisePropertiesChanged(nameof(HomeScore)); }
} }
/// <summary>
/// 主队赛季得分
/// </summary>
private string hSeasonScore; private string hSeasonScore;
public string HSeasonScore public string HSeasonScore
{ {
...@@ -40,7 +45,9 @@ namespace VIZ.TVP.CBA.Module.TeamStats.Model ...@@ -40,7 +45,9 @@ namespace VIZ.TVP.CBA.Module.TeamStats.Model
//public string AwayName { get; set; } //public string AwayName { get; set; }
/// <summary>
/// 客场得分
/// </summary>
private string awayScore; private string awayScore;
public string AwayScore public string AwayScore
{ {
...@@ -49,7 +56,9 @@ namespace VIZ.TVP.CBA.Module.TeamStats.Model ...@@ -49,7 +56,9 @@ namespace VIZ.TVP.CBA.Module.TeamStats.Model
} }
/// <summary>
/// 客场赛季得分
/// </summary>
private string aSeasonScore; private string aSeasonScore;
public string ASeasonScore public string ASeasonScore
{ {
...@@ -68,7 +77,9 @@ namespace VIZ.TVP.CBA.Module.TeamStats.Model ...@@ -68,7 +77,9 @@ namespace VIZ.TVP.CBA.Module.TeamStats.Model
set { light = value; this.RaisePropertiesChanged(nameof(Light)); } set { light = value; this.RaisePropertiesChanged(nameof(Light)); }
} }
/// <summary>
/// 技术统计
/// </summary>
private TechStats techStats = TechStats.Goal; private TechStats techStats = TechStats.Goal;
...@@ -78,7 +89,9 @@ namespace VIZ.TVP.CBA.Module.TeamStats.Model ...@@ -78,7 +89,9 @@ namespace VIZ.TVP.CBA.Module.TeamStats.Model
set { techStats = value; this.RaisePropertiesChanged(nameof(TechStats)); } set { techStats = value; this.RaisePropertiesChanged(nameof(TechStats)); }
} }
/// <summary>
/// 选中行是否高亮
/// </summary>
private string selectLight = "不高亮"; private string selectLight = "不高亮";
public string SelectLight public string SelectLight
{ {
...@@ -86,7 +99,9 @@ namespace VIZ.TVP.CBA.Module.TeamStats.Model ...@@ -86,7 +99,9 @@ namespace VIZ.TVP.CBA.Module.TeamStats.Model
set { selectLight = value; this.RaisePropertyChanged(nameof(SelectLight)); } set { selectLight = value; this.RaisePropertyChanged(nameof(SelectLight)); }
} }
/// <summary>
/// 技术统计名称
/// </summary>
private string techStatsName; private string techStatsName;
public string TechStatsName public string TechStatsName
{ {
......
...@@ -15,12 +15,15 @@ using VIZ.TVP.CBA.Domain; ...@@ -15,12 +15,15 @@ using VIZ.TVP.CBA.Domain;
using VIZ.TVP.CBA.Module.SeasonData; using VIZ.TVP.CBA.Module.SeasonData;
using VIZ.TVP.CBA.Module.OnAirData; using VIZ.TVP.CBA.Module.OnAirData;
using System.ComponentModel; using System.ComponentModel;
using log4net;
namespace VIZ.TVP.CBA.Module.TeamStats.ViewModel namespace VIZ.TVP.CBA.Module.TeamStats.ViewModel
{ {
public class TeamStatsViewModel : ViewModelBase public class TeamStatsViewModel : ViewModelBase
{ {
private static ILog Log=LogManager.GetLogger(typeof(TeamStatsViewModel));
private static TeamStatsViewModel _createInstance = null; private static TeamStatsViewModel _createInstance = null;
public static TeamStatsViewModel CreateInstance public static TeamStatsViewModel CreateInstance
...@@ -35,8 +38,6 @@ namespace VIZ.TVP.CBA.Module.TeamStats.ViewModel ...@@ -35,8 +38,6 @@ namespace VIZ.TVP.CBA.Module.TeamStats.ViewModel
} }
} }
public TeamStatsViewModel() public TeamStatsViewModel()
{ {
BtnCommand = new VCommand(BtnCmd); BtnCommand = new VCommand(BtnCmd);
...@@ -233,10 +234,14 @@ namespace VIZ.TVP.CBA.Module.TeamStats.ViewModel ...@@ -233,10 +234,14 @@ namespace VIZ.TVP.CBA.Module.TeamStats.ViewModel
/// </summary> /// </summary>
public TeamSeasonData TeamSeasonData = new TeamSeasonData(); public TeamSeasonData TeamSeasonData = new TeamSeasonData();
/// <summary>
/// 实时直播数据
/// </summary>
public OnAirDataModel onAirDataModel = new OnAirDataModel(); public OnAirDataModel onAirDataModel = new OnAirDataModel();
/// <summary>
/// 技术统计项
/// </summary>
private string matchStatsId; private string matchStatsId;
public string MatchStatsId public string MatchStatsId
...@@ -446,6 +451,8 @@ namespace VIZ.TVP.CBA.Module.TeamStats.ViewModel ...@@ -446,6 +451,8 @@ namespace VIZ.TVP.CBA.Module.TeamStats.ViewModel
{ {
//CombineTeamComData(); //CombineTeamComData();
Log.Info("球队对比数据:"+CombineTeamComData());
ApplicationDomainEx.VizEngineModel.STAGE_START("Default/SQD", "dqyData", CombineTeamComData()); ApplicationDomainEx.VizEngineModel.STAGE_START("Default/SQD", "dqyData", CombineTeamComData());
} }
...@@ -522,7 +529,7 @@ namespace VIZ.TVP.CBA.Module.TeamStats.ViewModel ...@@ -522,7 +529,7 @@ namespace VIZ.TVP.CBA.Module.TeamStats.ViewModel
private void BtnCmd() private void BtnCmd()
{ {
onAirDataModel = JsonModel.OnAirData_Path(ScheduleID); onAirDataModel = JsonModel.OnAirData_Path(ScheduleID);
if (onAirDataModel == null) return;
Utils.SetHomeTeamDictionary(this); Utils.SetHomeTeamDictionary(this);
Utils.SetVisitTeamDictionary(this); Utils.SetVisitTeamDictionary(this);
Utils.SetHData(this); Utils.SetHData(this);
...@@ -537,6 +544,7 @@ namespace VIZ.TVP.CBA.Module.TeamStats.ViewModel ...@@ -537,6 +544,7 @@ namespace VIZ.TVP.CBA.Module.TeamStats.ViewModel
ScheduleID = SetMatchDict[SelectMatchItems]; ScheduleID = SetMatchDict[SelectMatchItems];
onAirDataModel = JsonModel.OnAirData_Path(ScheduleID); onAirDataModel = JsonModel.OnAirData_Path(ScheduleID);
if (onAirDataModel == null) return;
if (onAirDataModel != null) if (onAirDataModel != null)
{ {
...@@ -564,6 +572,7 @@ namespace VIZ.TVP.CBA.Module.TeamStats.ViewModel ...@@ -564,6 +572,7 @@ namespace VIZ.TVP.CBA.Module.TeamStats.ViewModel
AwayTeam = onAirDataModel.liveTeamInfo.VisitingTeamCNAlias; AwayTeam = onAirDataModel.liveTeamInfo.VisitingTeamCNAlias;
TeamSeasonData = JsonModel.TeamSeasonData_Path(Matchtypeid); TeamSeasonData = JsonModel.TeamSeasonData_Path(Matchtypeid);
SetTeamSeasonDictionary(); SetTeamSeasonDictionary();
Utils.SetHomeTeamDictionary(this); Utils.SetHomeTeamDictionary(this);
...@@ -574,12 +583,13 @@ namespace VIZ.TVP.CBA.Module.TeamStats.ViewModel ...@@ -574,12 +583,13 @@ namespace VIZ.TVP.CBA.Module.TeamStats.ViewModel
} }
/// <summary>
/// 设置球队赛季数据字典集合
/// </summary>
private void SetTeamSeasonDictionary() private void SetTeamSeasonDictionary()
{ {
CNAliasVisitSportsDictionary.Clear(); CNAliasVisitSportsDictionary.Clear();
if (TeamSeasonData == null) return;
foreach (var teamSeasonData in TeamSeasonData.teamstats) foreach (var teamSeasonData in TeamSeasonData.teamstats)
{ {
...@@ -618,18 +628,22 @@ namespace VIZ.TVP.CBA.Module.TeamStats.ViewModel ...@@ -618,18 +628,22 @@ namespace VIZ.TVP.CBA.Module.TeamStats.ViewModel
private void GetSchedule() private void GetSchedule()
{ {
try
{
MatchItems = new ObservableCollection<string>(); MatchItems = new ObservableCollection<string>();
string date = Convert.ToDateTime(matchDate).ToString("yyyy-MM-dd"); string date = Convert.ToDateTime(matchDate).ToString("yyyy-MM-dd");
var dayschedules = JsonModel.TomorrowMatch_Path(date); var dayschedules = JsonModel.TomorrowMatch_Path(date);
if (dayschedules == null) return;
// matchData.AddRange(dayschedules.dayschedule); // matchData.AddRange(dayschedules.dayschedule);
//MatchData = new ObservableCollection<Dayschedule>(); //MatchData = new ObservableCollection<Dayschedule>();
if (dayschedules != null) //if (dayschedules != null)
{ //{
dayschedules.dayschedule = dayschedules.dayschedule.OrderBy(a => Convert.ToDateTime(a.time)).ToList(); dayschedules.dayschedule = dayschedules.dayschedule.OrderBy(a => Convert.ToDateTime(a.time)).ToList();
} // }
SetMatchDict.Clear(); SetMatchDict.Clear();
MatchItems.Clear(); MatchItems.Clear();
...@@ -670,6 +684,11 @@ namespace VIZ.TVP.CBA.Module.TeamStats.ViewModel ...@@ -670,6 +684,11 @@ namespace VIZ.TVP.CBA.Module.TeamStats.ViewModel
+ "VS" + dayschedule.VisitingTeamName); + "VS" + dayschedule.VisitingTeamName);
} }
}
catch(Exception ex)
{
Log.Error(ex.Message);
}
} }
......
...@@ -95,6 +95,7 @@ ...@@ -95,6 +95,7 @@
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Web" /> <Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" /> <Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
......
...@@ -12,5 +12,11 @@ namespace VIZ.MIGU.CBA ...@@ -12,5 +12,11 @@ namespace VIZ.MIGU.CBA
/// </summary> /// </summary>
public partial class App : Application public partial class App : Application
{ {
public App()
{
string configPath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "log.config");
log4net.Config.XmlConfigurator.Configure(new System.IO.FileInfo(configPath));
}
} }
} }
...@@ -61,8 +61,13 @@ ...@@ -61,8 +61,13 @@
<Reference Include="DevExpress.Xpf.Core.v22.1" /> <Reference Include="DevExpress.Xpf.Core.v22.1" />
<Reference Include="DevExpress.Xpf.Themes.Office2019Colorful.v22.1" /> <Reference Include="DevExpress.Xpf.Themes.Office2019Colorful.v22.1" />
<Reference Include="DevExpress.Drawing.v22.1" /> <Reference Include="DevExpress.Drawing.v22.1" />
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
...@@ -114,6 +119,10 @@ ...@@ -114,6 +119,10 @@
<None Include="App.config"> <None Include="App.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Include="log.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="packages.config" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput> <LastGenOutput>Settings.Designer.cs</LastGenOutput>
......
<?xml version="1.0" encoding="utf-8" ?>
<log4net>
<appender name="errorAppender" type="log4net.Appender.RollingFileAppender">
<filter type="log4net.Filter.LevelMatchFilter">
<levelToMatch value="ERROR" />
</filter>
<filter type="log4net.Filter.DenyAllFilter" />
<file value="Logs\err.log" />
<encoding value="utf-8"/>
<preserveLogFileNameExtension value="true" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyyMMdd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
</layout>
</appender>
<appender name="infoAppender" type="log4net.Appender.RollingFileAppender">
<filter type="log4net.Filter.LevelMatchFilter">
<levelToMatch value="INFO" />
</filter>
<filter type="log4net.Filter.DenyAllFilter" />
<file value="Logs\info.log" />
<encoding value="utf-8"/>
<preserveLogFileNameExtension value="true" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyyMMdd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
</layout>
</appender>
<appender name="debugAppender" type="log4net.Appender.RollingFileAppender">
<filter type="log4net.Filter.LevelMatchFilter">
<levelToMatch value="DEBUG" />
</filter>
<filter type="log4net.Filter.DenyAllFilter" />
<file value="Logs\debug.log" />
<encoding value="utf-8"/>
<preserveLogFileNameExtension value="true" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyyMMdd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
</layout>
</appender>
<appender name="perfAppender" type="log4net.Appender.RollingFileAppender">
<filter type="log4net.Filter.LevelMatchFilter">
<levelToMatch value="INFO" />
</filter>
<filter type="log4net.Filter.DenyAllFilter" />
<file value="Logs\perf.log" />
<encoding value="utf-8"/>
<preserveLogFileNameExtension value="true" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyyMMdd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %logger - %message%newline" />
</layout>
</appender>
<root>
<level value="ALL" />
<appender-ref ref="errorAppender" />
<appender-ref ref="infoAppender" />
<appender-ref ref="debugAppender" />
</root>
<logger name="Performance" additivity="false">
<level value="ALL" />
<appender-ref ref="perfAppender" />
</logger>
</log4net>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.14" targetFramework="net48" />
</packages>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment