예제 #1
0
        public IConnectionParams CreateParamsFromIdentity(EventLogIdentity identity)
        {
            ConnectionParams p = new ConnectionParams();

            p[ConnectionParamsKeys.IdentityConnectionParam] = identity.ToIdentityString();
            return(p);
        }
예제 #2
0
 public LogProvider(ILogProviderHost host, IConnectionParams connectParams, Factory factory)
     :
     base(host,
          factory,
          connectParams,
          new DejitteringParams() { JitterBufferSize = 25 }
          )
 {
     using (trace.NewFrame)
     {
         try
         {
             eventLogIdentity = EventLogIdentity.FromConnectionParams(connectParams);
             StartLiveLogThread("EventLog listening thread");
         }
         catch (Exception e)
         {
             trace.Error(e, "Failed to initialize Windows Event Log reader. Disposing what has been created so far.");
             Dispose();
             throw;
         }
     }
 }
예제 #3
0
 string ILogProviderFactory.GetUserFriendlyConnectionName(IConnectionParams connectParams)
 {
     return("Windows Event Log: " + EventLogIdentity.FromConnectionParams(connectParams).ToUserFriendlyString());
 }
예제 #4
0
 public IConnectionParams CreateParamsFromEventLogName(string machineName, string eventLogName)
 {
     return(CreateParamsFromIdentity(EventLogIdentity.FromLiveLogParams(machineName, eventLogName)));
 }
예제 #5
0
 public IConnectionParams CreateParamsFromFileName(string fileName)
 {
     return(CreateParamsFromIdentity(EventLogIdentity.FromFileName(fileName)));
 }
예제 #6
0
 public string GetUserFriendlyConnectionName(IConnectionParams connectParams)
 {
     return("Windows Event Log: " + EventLogIdentity.FromConnectionParams(connectParams).ToUserFriendlyString());
 }