mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-24 18:47:30 +00:00
Adding support for capturing the output of a node instance for custom logging implementations.
This commit is contained in:
committed by
SteveSandersonMS
parent
a14d9ba2df
commit
27ffa72e0d
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.AspNetCore.NodeServices.Util
|
||||
{
|
||||
public class ConsoleNodeInstanceOutputLogger : INodeInstanceOutputLogger
|
||||
{
|
||||
public void LogOutputData(string outputData)
|
||||
{
|
||||
Console.WriteLine("[Node] " + outputData);
|
||||
}
|
||||
|
||||
public void LogErrorData(string errorData)
|
||||
{
|
||||
Console.WriteLine("[Node] " + errorData);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.AspNetCore.NodeServices.Util
|
||||
{
|
||||
public interface INodeInstanceOutputLogger
|
||||
{
|
||||
void LogOutputData(string outputData);
|
||||
|
||||
void LogErrorData(string errorData);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user