using ExitGames.Logging.Log4Net;
using ExitGames.Logging;
using log4net.Config;
using log4net;
using LogManager = ExitGames.Logging.LogManager;
protected override void Setup()
{
log4net.GlobalContext.Properties["Photon:ApplicationLogPath"] =
Path.Combine(this.ApplicationRootPath, "log");
string path = Path.Combine(this.BinaryPath, "log4net.config");
var file = new FileInfo(path);
if (file.Exists)
{
LogManager.SetLoggerFactory(Log4NetLoggerFactory.Instance);
XmlConfigurator.ConfigureAndWatch(file);
}
}
啓動Photon,便可在log文件下找到log文件,輸出的log信息
服務器