Пример #1
0
 static void InitLogFactories(
     IUserDefinedFormatsManager userDefinedFormatsManager,
     ILogProviderFactoryRegistry factoryRegistry,
     ITempFilesManager tempFiles)
 {
     RegularGrammar.UserDefinedFormatFactory.Register(userDefinedFormatsManager);
     XmlFormat.UserDefinedFormatFactory.Register(userDefinedFormatsManager);
     JsonFormat.UserDefinedFormatFactory.Register(userDefinedFormatsManager);
     factoryRegistry.Register(new PlainText.Factory(tempFiles));
     factoryRegistry.Register(new XmlFormat.NativeXMLFormatFactory(tempFiles));
 }
Пример #2
0
        private static void RegisterPredefinedFormatFactories(
            ILogProviderFactoryRegistry logProviderFactoryRegistry,
            ITempFilesManager tempFilesManager,
            IUserDefinedFormatsManager userDefinedFormatsManager)
        {
#if WIN
            logProviderFactoryRegistry.Register(new DebugOutput.Factory());
            logProviderFactoryRegistry.Register(new WindowsEventLog.Factory());
#endif
            logProviderFactoryRegistry.Register(new PlainText.Factory(tempFilesManager));
            logProviderFactoryRegistry.Register(new XmlFormat.NativeXMLFormatFactory(tempFilesManager));
            userDefinedFormatsManager.ReloadFactories();
        }
Пример #3
0
 private static void RegisterPredefinedFormatFactories(
     ILogProviderFactoryRegistry logProviderFactoryRegistry,
     ITempFilesManager tempFilesManager,
     IUserDefinedFormatsManager userDefinedFormatsManager,
     RegularExpressions.IRegexFactory regexFactory,
     ITraceSourceFactory traceSourceFactory)
 {
     if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
     {
         RegisterWindowsOnlyFactories(logProviderFactoryRegistry);
     }
     logProviderFactoryRegistry.Register(new PlainText.Factory(tempFilesManager));
     logProviderFactoryRegistry.Register(new XmlFormat.NativeXMLFormatFactory(tempFilesManager, regexFactory, traceSourceFactory));
     userDefinedFormatsManager.ReloadFactories();
 }
Пример #4
0
 public static void RegisterFactories(ILogProviderFactoryRegistry registry, ITempFilesManager tempFiles)
 {
     registry.Register(new Factory(
                           "Azure Diagnostics Log",
                           "Windows Azure Diagnostics log that is stored in Azure Tables Storage table (WADLogsTable)",
                           new WADLogsTableProviderStrategy(),
                           tempFiles
                           ));
     registry.Register(new Factory(
                           "Azure Diagnostics Windows Event Log",
                           "Windows Azure operating system event log collected and stored in Azure Tables Storage table (WADWindowsEventLogsTable)",
                           new WADWindowsEventLogsTableProviderStrategy(),
                           tempFiles
                           ));
     registry.Register(new Factory(
                           "Azure Diagnostics Infrastructure Log",
                           "Windows Azure Diagnostics infrastructure log collected and stored in Azure Tables Storage table (WADDiagnosticInfrastructureLogsTable)",
                           new WADDiagnosticInfrastructureLogsTableProviderStrategy(),
                           tempFiles
                           ));
 }
Пример #5
0
 public static void Register(ILogProviderFactoryRegistry registry)
 {
     registry.Register(Instance);
 }
Пример #6
0
 private static void RegisterWindowsOnlyFactories(ILogProviderFactoryRegistry logProviderFactoryRegistry)
 {
     logProviderFactoryRegistry.Register(new DebugOutput.Factory());
     logProviderFactoryRegistry.Register(new WindowsEventLog.Factory());
 }
Пример #7
0
 public static void RegisterInstances(ILogProviderFactoryRegistry registry)
 {
     registry.Register(WADLogsTableFactoryInstance);
     registry.Register(WADWindowsEventLogsTableFactoryInstance);
     registry.Register(WADDiagnosticInfrastructureLogsTableFactoryInstance);
 }