Skip to content

Commit

Permalink
Well try that. Static....
Browse files Browse the repository at this point in the history
  • Loading branch information
wasabii committed Dec 6, 2023
1 parent 63c4d76 commit 72b8bdf
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions src/IKVM.Maven.Sdk.Tasks/MavenReferenceItemResolve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,29 @@ public class MavenReferenceItemResolve : Task
}
};

static MSBuildLogTraceListener listener;

static MavenReferenceItemResolve()
{
IKVM.Runtime.Tracer.SetTraceLevel("jni", System.Diagnostics.TraceLevel.Verbose);
Trace.Listeners.Add(new ConsoleTraceListener());
Trace.Listeners.Add(listener = new MSBuildLogTraceListener());
}

class MSBuildLogTraceListener : TraceListener
{

public Task task;

public override void Write(string message)
{
task.Log.LogMessage(message);
}

public override void WriteLine(string message)
{
task.Log.LogMessage(message);
}

}

/// <summary>
Expand All @@ -66,7 +85,7 @@ static MavenReferenceItemResolve()
public MavenReferenceItemResolve() :
base(SR.ResourceManager, "MAVEN:")
{

listener.task = this;
}

/// <summary>
Expand Down

0 comments on commit 72b8bdf

Please sign in to comment.