• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ILogManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ILogManager的典型用法代码示例。如果您正苦于以下问题:C# ILogManager类的具体用法?C# ILogManager怎么用?C# ILogManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ILogManager类属于命名空间,在下文中一共展示了ILogManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SessionWebSocketListener

 /// <summary>
 /// Initializes a new instance of the <see cref="SessionWebSocketListener" /> class.
 /// </summary>
 /// <param name="sessionManager">The session manager.</param>
 /// <param name="logManager">The log manager.</param>
 /// <param name="dtoService">The dto service.</param>
 public SessionWebSocketListener(ISessionManager sessionManager, ILogManager logManager, IDtoService dtoService, IServerApplicationHost appHost)
 {
     _sessionManager = sessionManager;
     _logger = logManager.GetLogger(GetType().Name);
     _dtoService = dtoService;
     _appHost = appHost;
 }
开发者ID:Rycius,项目名称:MediaBrowser,代码行数:13,代码来源:SessionWebSocketListener.cs


示例2: MusicBrainzAlbumProvider

        public MusicBrainzAlbumProvider(ILogManager logManager, IServerConfigurationManager configurationManager, IHttpClient httpClient)
            : base(logManager, configurationManager)
        {
            _httpClient = httpClient;

            Current = this;
        }
开发者ID:RomanDengin,项目名称:MediaBrowser,代码行数:7,代码来源:MusicBrainzAlbumProvider.cs


示例3: WriteToLog

        public void WriteToLog(ILogManager logManager)
        {
            // Enumerate over the input file counters and total up all the matched and unmatched totals.
              UInt32 matchedTotal = 0, unmatchedTotal = 0;
              PerformActionOverInputFileCounters((i) =>
              {
            matchedTotal += i.Matched;
            unmatchedTotal += i.Unmatched;
              });

              logManager.WriteImportantMessageToJobLog(String.Format("{0} Record(s) processed.", matchedTotal + unmatchedTotal));

              if (matchedTotal + unmatchedTotal == 0)
              {
            // No records processed so nothing more to report.
            return;
              }

              logManager.WriteImportantMessageToJobLog(String.Format("{0} Record(s) matched.", matchedTotal));
              logManager.WriteImportantMessageToJobLog(String.Format("{0} Record(s) not matched.", unmatchedTotal));

              // Enumerate over the input file counters and write out the individual totals to the log.
              PerformActionOverInputFileCounters((i) =>
              {
            logManager.WriteImportantMessageToJobLog(String.Format("{0} Record(s) processed from input file {1}.", i.Matched + i.Unmatched, i.FilePath));
            logManager.WriteImportantMessageToJobLog(String.Format("{0} Record(s) matched from input file {1}.", i.Matched, i.FilePath));
            logManager.WriteImportantMessageToJobLog(String.Format("{0} Record(s) not matched from input file {1}.", i.Unmatched, i.FilePath));
              });

              // Enumerate over the output file counters and write out the individual totals to the log.
              foreach (var outputFileCounter in this.outputFileCounters.Values)
              {
            logManager.WriteImportantMessageToJobLog(String.Format("{0} Record(s) written to output file {1}.", outputFileCounter.Total, outputFileCounter.FilePath));
              }
        }
开发者ID:toyners,项目名称:Siftan,代码行数:35,代码来源:StatisticsManager.cs


示例4: MainWindow

        /// <summary>
        /// Initializes a new instance of the <see cref="MainWindow" /> class.
        /// </summary>
        /// <param name="logManager">The log manager.</param>
        /// <param name="appHost">The app host.</param>
        /// <param name="configurationManager">The configuration manager.</param>
        /// <param name="userManager">The user manager.</param>
        /// <param name="libraryManager">The library manager.</param>
        /// <param name="jsonSerializer">The json serializer.</param>
        /// <param name="displayPreferencesManager">The display preferences manager.</param>
        /// <exception cref="System.ArgumentNullException">logger</exception>
        public MainWindow(ILogManager logManager, IServerApplicationHost appHost, IServerConfigurationManager configurationManager, IUserManager userManager, ILibraryManager libraryManager, IJsonSerializer jsonSerializer, IDisplayPreferencesRepository displayPreferencesManager)
        {
            if (logManager == null)
            {
                throw new ArgumentNullException("logManager");
            }
            if (appHost == null)
            {
                throw new ArgumentNullException("appHost");
            }
            if (configurationManager == null)
            {
                throw new ArgumentNullException("configurationManager");
            }

            _logger = logManager.GetLogger("MainWindow");
            _appHost = appHost;
            _logManager = logManager;
            _configurationManager = configurationManager;
            _userManager = userManager;
            _libraryManager = libraryManager;
            _jsonSerializer = jsonSerializer;
            _displayPreferencesManager = displayPreferencesManager;

            InitializeComponent();

            Loaded += MainWindowLoaded;
        }
开发者ID:Jon-theHTPC,项目名称:MediaBrowser,代码行数:39,代码来源:MainWindow.xaml.cs


示例5: EpisodeProviderFromXml

 public EpisodeProviderFromXml(ILogManager logManager, IServerConfigurationManager configurationManager, IItemRepository itemRepo, IFileSystem fileSystem)
     : base(logManager, configurationManager)
 {
     _itemRepo = itemRepo;
     _fileSystem = fileSystem;
     Current = this;
 }
开发者ID:Jon-theHTPC,项目名称:MediaBrowser,代码行数:7,代码来源:EpisodeProviderFromXml.cs


示例6: LogForm

        public LogForm(ILogManager logManager)
        {
            InitializeComponent();

            _logManager = logManager;
            _uiThread = TaskScheduler.FromCurrentSynchronizationContext();
        }
开发者ID:bigjohn322,项目名称:MediaBrowser,代码行数:7,代码来源:LogForm.cs


示例7: StatisticsTask

 /// <summary>
 /// Initializes a new instance of the <see cref="ReloadLoggerFileTask" /> class.
 /// </summary>
 /// <param name="logManager">The logManager.</param>
 /// <param name="appHost"></param>
 /// <param name="httpClient"></param>
 public StatisticsTask(ILogManager logManager, IApplicationHost appHost, INetworkManager networkManager, IHttpClient httpClient)
 {
     LogManager = logManager;
     ApplicationHost = appHost;
     NetworkManager = networkManager;
     HttpClient = httpClient;
 }
开发者ID:jscorrea,项目名称:MediaBrowser,代码行数:13,代码来源:StatisticsTask.cs


示例8: MashupInfoRepository

 public MashupInfoRepository(ILogManager logManager, IPluginContext context, ITpBus bus, IMashupScriptStorage scriptStorage)
 {
     _bus = bus;
     _scriptStorage = scriptStorage;
     _log = logManager.GetLogger(GetType());
     _context = context;
 }
开发者ID:FarReachJason,项目名称:Target-Process-Plugins,代码行数:7,代码来源:MashupInfoRepository.cs


示例9: TuneInChannel

        public TuneInChannel(IHttpClient httpClient, ILogManager logManager)
        {
            _httpClient = httpClient;
            _logger = logManager.GetLogger(GetType().Name);

            partnerid = "uD1X52pA";
        }
开发者ID:algel,项目名称:Emby.Channels,代码行数:7,代码来源:TuneInChannel.cs


示例10: SSDPServer

		/// <summary>
		///     Initializes a new instance of the <see cref="SSDPServer" /> class.
		/// </summary>
		/// <param name="logManager">
		///     The <see cref="ILogManager"/> to use for logging the debug information.
		/// </param>
		private SSDPServer(ILogManager logManager = null)
		{
			if (logManager != null)
			{
				this.logger = logManager.GetLogger<SSDPServer>();
			}
		}
开发者ID:iamhenning,项目名称:UPnPLite,代码行数:13,代码来源:SSDPServer.cs


示例11: MediaResource

		/// <summary>
		///		Initializes a new instance of the <see cref="MediaResource"/> class.
		/// </summary>
		/// <param name="logManager">
		///		The log manager to use for logging.
		///	</param>
		public MediaResource(ILogManager logManager = null)
		{
			if (logManager != null)
			{
				this.logger = logManager.GetLogger<MediaResource>();
			}
		}
开发者ID:iamhenning,项目名称:UPnPLite,代码行数:13,代码来源:MediaResource.cs


示例12: RunApplication

        private static void RunApplication(ServerApplicationPaths appPaths, ILogManager logManager, StartupOptions options)
        {
            SystemEvents.SessionEnding += SystemEvents_SessionEnding;

            // Allow all https requests
            ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; });

            var fileSystem = new CommonFileSystem(logManager.GetLogger("FileSystem"), false, true);

            var nativeApp = new NativeApp();

            _appHost = new ApplicationHost(appPaths, logManager, options, fileSystem, "MBServer.Mono", nativeApp);

            if (options.ContainsOption("-v"))
            {
                Console.WriteLine(_appHost.ApplicationVersion.ToString());
                return;
            }

            Console.WriteLine("appHost.Init");

            var initProgress = new Progress<double>();

            var task = _appHost.Init(initProgress);
            Task.WaitAll(task);

            Console.WriteLine("Running startup tasks");

            task = _appHost.RunStartupTasks();
            Task.WaitAll(task);

            task = ApplicationTaskCompletionSource.Task;

            Task.WaitAll(task);
        }
开发者ID:jrags56,项目名称:MediaBrowser,代码行数:35,代码来源:Program.cs


示例13: AudioImageProvider

        /// <summary>
        /// Initializes a new instance of the <see cref="BaseMetadataProvider" /> class.
        /// </summary>
        /// <param name="logManager">The log manager.</param>
        /// <param name="configurationManager">The configuration manager.</param>
        /// <param name="mediaEncoder">The media encoder.</param>
        public AudioImageProvider(ILogManager logManager, IServerConfigurationManager configurationManager, IMediaEncoder mediaEncoder)
            : base(logManager, configurationManager)
        {
            _mediaEncoder = mediaEncoder;

            ImageCache = new FileSystemRepository(Kernel.Instance.FFMpegManager.AudioImagesDataPath);
        }
开发者ID:Jon-theHTPC,项目名称:MediaBrowser,代码行数:13,代码来源:AudioImageProvider.cs


示例14: SearchEngine

        public SearchEngine(ILogManager logManager, ILibraryManager libraryManager, IUserManager userManager)
        {
            _libraryManager = libraryManager;
            _userManager = userManager;

            _logger = logManager.GetLogger("Lucene");
        }
开发者ID:jscorrea,项目名称:MediaBrowser,代码行数:7,代码来源:SearchEngine.cs


示例15: MashupScriptStorage

		public MashupScriptStorage(IPluginContext context, IMashupLocalFolder folder, ILogManager logManager, IMashupLoader mashupLoader)
		{
			_folder = folder;
			_mashupLoader = mashupLoader;
			_log = logManager.GetLogger(GetType());
			_accountName = context.AccountName;
		}
开发者ID:TargetProcess,项目名称:Target-Process-Plugins,代码行数:7,代码来源:MashupScriptStorage.cs


示例16: SyncFromTraktTask

 /// <summary>
 /// 
 /// </summary>
 /// <param name="logger"></param>
 /// <param name="jsonSerializer"></param>
 /// <param name="userManager"></param>
 /// <param name="userDataManager"> </param>
 /// <param name="httpClient"></param>
 /// <param name="appHost"></param>
 /// <param name="fileSystem"></param>
 public SyncFromTraktTask(ILogManager logger, IJsonSerializer jsonSerializer, IUserManager userManager, IUserDataManager userDataManager, IHttpClient httpClient, IServerApplicationHost appHost, IFileSystem fileSystem)
 {
     _userManager = userManager;
     _userDataManager = userDataManager;
     _logger = logger.GetLogger("Trakt");
     _traktApi = new TraktApi(jsonSerializer, _logger, httpClient, appHost, userDataManager, fileSystem);
 }
开发者ID:ryu4000,项目名称:MediaBrowser.Plugins,代码行数:17,代码来源:SyncFromTraktTask.cs


示例17: DlnaEntryPoint

 public DlnaEntryPoint(IServerConfigurationManager config, 
     ILogManager logManager, 
     IServerApplicationHost appHost, 
     INetworkManager network, 
     ISessionManager sessionManager, 
     IHttpClient httpClient, 
     ILibraryManager libraryManager, 
     IUserManager userManager, 
     IDlnaManager dlnaManager, 
     IImageProcessor imageProcessor, 
     IUserDataManager userDataManager, 
     ILocalizationManager localization, 
     IMediaSourceManager mediaSourceManager, 
     ISsdpHandler ssdpHandler)
 {
     _config = config;
     _appHost = appHost;
     _network = network;
     _sessionManager = sessionManager;
     _httpClient = httpClient;
     _libraryManager = libraryManager;
     _userManager = userManager;
     _dlnaManager = dlnaManager;
     _imageProcessor = imageProcessor;
     _userDataManager = userDataManager;
     _localization = localization;
     _mediaSourceManager = mediaSourceManager;
     _ssdpHandler = (SsdpHandler)ssdpHandler;
     _logger = logManager.GetLogger("Dlna");
 }
开发者ID:jrags56,项目名称:MediaBrowser,代码行数:30,代码来源:DlnaEntryPoint.cs


示例18: ServerConfigurationManager

 /// <summary>
 /// Initializes a new instance of the <see cref="ServerConfigurationManager" /> class.
 /// </summary>
 /// <param name="applicationPaths">The application paths.</param>
 /// <param name="logManager">The log manager.</param>
 /// <param name="xmlSerializer">The XML serializer.</param>
 public ServerConfigurationManager(IApplicationPaths applicationPaths, ILogManager logManager, IXmlSerializer xmlSerializer)
     : base(applicationPaths, logManager, xmlSerializer)
 {
     UpdateItemsByNamePath();
     UpdateTranscodingTempPath();
     UpdateMetadataPath();
 }
开发者ID:bigjohn322,项目名称:MediaBrowser,代码行数:13,代码来源:ServerConfigurationManager.cs


示例19: DropboxServerSyncProvider

 public DropboxServerSyncProvider(IConfigurationRetriever configurationRetriever, IDropboxApi dropboxApi, IDropboxContentApi dropboxContentApi, ILogManager logManager)
 {
     _configurationRetriever = configurationRetriever;
     _dropboxApi = dropboxApi;
     _dropboxContentApi = dropboxContentApi;
     _logger = logManager.GetLogger("Dropbox");
 }
开发者ID:SvenVandenbrande,项目名称:Emby.Plugins,代码行数:7,代码来源:DropboxServerSyncProvider.cs


示例20: StartApplication

		/// <summary>
		/// Runs the application.
		/// </summary>
		/// <param name="appPaths">The app paths.</param>
		/// <param name="logManager">The log manager.</param>
		/// <param name="options">The options.</param>
		private static void StartApplication(ServerApplicationPaths appPaths, 
			ILogManager logManager, 
			StartupOptions options)
		{
			SystemEvents.SessionEnding += SystemEvents_SessionEnding;

			// Allow all https requests
			ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; });

			var fileSystem = new ManagedFileSystem(new PatternsLogger(logManager.GetLogger("FileSystem")), false, true);
            fileSystem.AddShortcutHandler(new MbLinkShortcutHandler(fileSystem));

			var nativeApp = new NativeApp(logManager.GetLogger("App"));

			AppHost = new ApplicationHost(appPaths, logManager, options, fileSystem, "Emby.Server.Mac.pkg", nativeApp);

			if (options.ContainsOption("-v")) {
				Console.WriteLine (AppHost.ApplicationVersion.ToString());
				return;
			}

			Console.WriteLine ("appHost.Init");

			Task.Run (() => StartServer(CancellationToken.None));
		}
开发者ID:ChubbyArse,项目名称:Emby,代码行数:31,代码来源:Main.cs



注:本文中的ILogManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ILogMessage类代码示例发布时间:2022-05-24
下一篇:
C# ILogFormatter类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap