Skip to content

Commit 7fd5030

Browse files
committed
Disable LogManager by default
#4
1 parent ac7730d commit 7fd5030

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Src/EngineIoClientDotNet.Tests.mono/ClientTests/BinaryPollingTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public class BinaryPollingTest : Connection
7979
[Fact]
8080
public void ReceiveBinaryData()
8181
{
82-
82+
LogManager.Enabled = true;
8383
var log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod());
8484
log.Info("Start");
8585
_manualResetEvent = new ManualResetEvent(false);

Src/EngineIoClientDotNet.mono/Modules/LogManager.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ public class LogManager
1111

1212
private static System.IO.StreamWriter file;
1313

14+
public static bool Enabled = false;
15+
1416
#region Statics
1517

1618
public static void SetupLogManager()
@@ -52,6 +54,10 @@ public LogManager(string type)
5254
public void Info(string msg)
5355
{
5456
//Trace.WriteLine(string.Format("{0} [{3}] {1} - {2}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff"), MyType, msg, System.Threading.Thread.CurrentThread.ManagedThreadId));
57+
if (!Enabled)
58+
{
59+
return;
60+
}
5561

5662
if (LogManager.file == null)
5763
{

0 commit comments

Comments
 (0)