示例#1
0
文件: Extensions.cs 项目: yawsh/XAPI2
 public static string ToFormattedString([In] this LogField field)
 {
     return(string.Format("[Level={0};Message={1}]",
                          Enum <LogLevel> .ToString(field.Level), field.Message()));
 }
示例#2
0
文件: Extensions.cs 项目: yawsh/XAPI2
 public static string Message([In] this LogField field)
 {
     return(PInvokeUtility.GetUnicodeString(field.Message));
 }
 private void OnLog_callback(object sender, ref LogField log)
 {
     (sender as XApi).Log.Info("OnLog:" + log.ToFormattedString());
 }