本文整理汇总了C#中ILogManager类的典型用法代码示例。如果您正苦于以下问题:C# ILogManager类的具体用法?C# ILogManager怎么用?C# ILogManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ILogManager类属于命名空间,在下文中一共展示了ILogManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例2: MusicBrainzAlbumProvider
public MusicBrainzAlbumProvider(ILogManager logManager, IServerConfigurationManager configurationManager, IHttpClient httpClient)
: base(logManager, configurationManager)
{
_httpClient = httpClient;
Current = this;
}
示例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));
}
}
示例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;
}
示例5: EpisodeProviderFromXml
public EpisodeProviderFromXml(ILogManager logManager, IServerConfigurationManager configurationManager, IItemRepository itemRepo, IFileSystem fileSystem)
: base(logManager, configurationManager)
{
_itemRepo = itemRepo;
_fileSystem = fileSystem;
Current = this;
}
示例6: LogForm
public LogForm(ILogManager logManager)
{
InitializeComponent();
_logManager = logManager;
_uiThread = TaskScheduler.FromCurrentSynchronizationContext();
}
示例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;
}
示例8: MashupInfoRepository
public MashupInfoRepository(ILogManager logManager, IPluginContext context, ITpBus bus, IMashupScriptStorage scriptStorage)
{
_bus = bus;
_scriptStorage = scriptStorage;
_log = logManager.GetLogger(GetType());
_context = context;
}
示例9: TuneInChannel
public TuneInChannel(IHttpClient httpClient, ILogManager logManager)
{
_httpClient = httpClient;
_logger = logManager.GetLogger(GetType().Name);
partnerid = "uD1X52pA";
}
示例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>();
}
}
示例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>();
}
}
示例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);
}
示例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);
}
示例14: SearchEngine
public SearchEngine(ILogManager logManager, ILibraryManager libraryManager, IUserManager userManager)
{
_libraryManager = libraryManager;
_userManager = userManager;
_logger = logManager.GetLogger("Lucene");
}
示例15: MashupScriptStorage
public MashupScriptStorage(IPluginContext context, IMashupLocalFolder folder, ILogManager logManager, IMashupLoader mashupLoader)
{
_folder = folder;
_mashupLoader = mashupLoader;
_log = logManager.GetLogger(GetType());
_accountName = context.AccountName;
}