public void Broadcast(PGIServer server, string applicationName, DBLoggingEventArgs loggingInfo) { if (_entMgr == null) { _entMgr = AuthenticationUtils.GetSqlEntityManager( LoginTypeEnum.WindowsActiveDirectory, applicationName, server, PGIDB.SmartBase ); } if (AppLog == null) { AppLog = UIUtils.LogApplicationOpen(_entMgr, applicationName, _entMgr.CurrentStaff); } //%d [%thread] %-5level %logger [%ndc] - %message%newline%exception AppLog.Comments += loggingInfo.FormattedMessage + "|"; AppLog.Save(); }
/// <summary> /// You can either specify the logging server and application name here or set it up in the log4net config file /// </summary> /// <param name="server"></param> /// <param name="applicationName"></param> public void Start(PGIServer server, string applicationName) { _entMgr = AuthenticationUtils.GetSqlEntityManager( LoginTypeEnum.WindowsActiveDirectory, applicationName, server, PGIDB.SmartBase ); AppLog = UIUtils.LogApplicationOpen(_entMgr, applicationName, _entMgr.CurrentStaff); }