AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
ConsoleLogWriter.cs
Go to the documentation of this file.
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // Licensed under the MIT License. See LICENSE in the project root for license information.
3 
4 using UnityEngine;
5 
6 namespace HoloToolkit.Sharing.Utilities
7 {
11  public class ConsoleLogWriter : LogWriter
12  {
13  public bool ShowDetailedLogs = false;
14 
15  public override void WriteLogEntry(LogSeverity severity, string message)
16  {
17  switch (severity)
18  {
19  case LogSeverity.Warning:
20  Debug.LogWarning(message);
21  break;
22  case LogSeverity.Error:
23  Debug.LogError(message);
24  break;
25  case LogSeverity.Info:
26  default:
27  if (ShowDetailedLogs)
28  {
29  Debug.Log(message);
30  }
31  break;
32  }
33  }
34  }
35 }
Utility class that writes the sharing service log messages to the Unity Engine's console.
override void WriteLogEntry(LogSeverity severity, string message)