C# Vlc.DotNet-显示日志控制台/打开文件日志记录

C# Vlc.DotNet-显示日志控制台/打开文件日志记录,c#,wpf,vlc,C#,Wpf,Vlc,我正在为WPF使用新的Vlc.DotNet库。它可以通过Nuget(Vlc.DotNet.Wpf)获得,它的Git存储库位于以下位置: 旧的VideoLan DotNet库(托管在此处:)具有一些与文件日志记录相关的非常有用的功能,显示调试日志记录控制台等: // Ignore the VLC configuration file VlcContext.StartupOptions.IgnoreConfig = true; // Enable file based logging VlcCon

我正在为WPF使用新的Vlc.DotNet库。它可以通过Nuget(Vlc.DotNet.Wpf)获得,它的Git存储库位于以下位置:

旧的VideoLan DotNet库(托管在此处:)具有一些与文件日志记录相关的非常有用的功能,显示调试日志记录控制台等:

// Ignore the VLC configuration file
VlcContext.StartupOptions.IgnoreConfig = true;

// Enable file based logging
VlcContext.StartupOptions.LogOptions.LogInFile = true;

// Shows the VLC log console (in addition to the applications window)
VlcContext.StartupOptions.LogOptions.ShowLoggerConsole = true;

// Set the log level for the VLC instance
VlcContext.StartupOptions.LogOptions.Verbosity = VlcLogVerbosities.Debug;

我在新回购协议中找不到这些功能。文档是不存在的,而且样本项目太少,无法从中获得太多信息。有人知道使用新的VLC.DotNet库是否可以实现任何类型的VLC日志记录吗?

在编写本文时,这些功能隐藏在VLC.DotNet.Core.Interops命名空间中的VlcManager类中。在实例化期间,VLC启动选项的字符串数组传递给此类:

Manager.CreateNewInstance(new[]
    {
        "--extraintf=logger",
        "--verbose=2"
    });

手动更改这些选项的唯一方法是在Vlc.DotNet源代码中更改它们,重新生成并更新对新生成的.dll的任何引用。

我发现我的正确位置在文件(截至2015年4月27日)Vlc.DotNet.Core.VlcMediaPlayer.VlcMediaPlayer.cs中:

#if DEBUG
            Manager.CreateNewInstance(new[]
            {
                "--extraintf=logger",
                "--verbose=2"
            });
#else
            Manager.CreateNewInstance(null);
#endif

在发布模式下编译Vlc.DotNet时,将不再获得详细的日志记录

几小时前@Remy想编辑这篇文章(我无法评论建议,我缺乏分数)。上面的代码是作者代码的复制品,不是我的代码。