Dot-Net

Windows 執行時:它是否包含日誌庫?

  • December 29, 2013

System.Diagnostics.Trace, System.Diagnostics.EventLog, 和System.Console所有似乎都不可用。WinRT 是否包含日誌庫?

我唯一能找到的東西(System.Diagnostics.Debug.WriteLine()):

   //
   // Summary:
   //     Writes a message followed by a line terminator to the trace listeners in
   //     the System.Diagnostics.Debug.Listeners collection.
   //
   // Parameters:
   //   message:
   //     A message to write.
   [Conditional("DEBUG")]
   public static void WriteLine(string message);

它寫入 Visual Studio 輸出視窗的調試輸出。

檢查這個庫,它基於 NLog:

https://github.com/mbrit/metrolog

引用自:https://stackoverflow.com/questions/8772522