Exemplo n.º 1
0
        public IConnectionParams CreateParamsFromIdentity(EventLogIdentity identity)
        {
            ConnectionParams p = new ConnectionParams();

            p[ConnectionParamsKeys.IdentityConnectionParam] = identity.ToIdentityString();
            return(p);
        }
Exemplo n.º 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;
         }
     }
 }
Exemplo n.º 3
0
 string ILogProviderFactory.GetUserFriendlyConnectionName(IConnectionParams connectParams)
 {
     return("Windows Event Log: " + EventLogIdentity.FromConnectionParams(connectParams).ToUserFriendlyString());
 }
Exemplo n.º 4
0
 public IConnectionParams CreateParamsFromEventLogName(string machineName, string eventLogName)
 {
     return(CreateParamsFromIdentity(EventLogIdentity.FromLiveLogParams(machineName, eventLogName)));
 }
Exemplo n.º 5
0
 public IConnectionParams CreateParamsFromFileName(string fileName)
 {
     return(CreateParamsFromIdentity(EventLogIdentity.FromFileName(fileName)));
 }
Exemplo n.º 6
0
 public string GetUserFriendlyConnectionName(IConnectionParams connectParams)
 {
     return("Windows Event Log: " + EventLogIdentity.FromConnectionParams(connectParams).ToUserFriendlyString());
 }