지금 콘솔 출력을 읽고, 필터링하고 처리해야하는 문제에 대해 작업하고 있습니다. 그것을 올바르게 구문 분석하는 것은 거의 불가능하므로 내 질문에 사용자 정의 출력 채널로 작업하는 것이 가능합니다. 현재로서는 Console.Error
및 Console.Out
만 사용할 수 있습니다. 그러나 이것만으로는 효율적으로 분리 할 수 없습니다.사용자 지정 콘솔 출력 채널
예 콘솔 출력 : Console.C1.WriteLine("Message 1")
는 그리고 C2에 대한 :
Info text over many lines. It can be everything written in plain text.
Now important messages are coming I have to filter out.
Important Message for C1! It can be everything in plain text.
Important Message for C1! It can be everything in plain text.
Important Message for C1! It can be everything in plain text.
Info text over many lines. It can be everything written in plain text.
Now important messages are coming I have to filter out.
Important Message for C2! It can be everything in plain text.
Important Message for C2! It can be everything in plain text.
Important Message for C2! It can be everything in plain text.
지금 나는이 같은 C1의 출력을 기록 할 Console.C2.WriteLine("Message 2")
당신이 볼 수있는 콘솔의 유일한 차이점은 색상입니다 . 어쩌면 내가 이걸 할 수 있을까? 그렇다면 좋은 일이 될 것입니다.
는 당신의 도움을 주셔서 감사합니다 : 여러 출력 채널을 이용할 수있는 것이다, 그래서 당신은 대신 콘솔의 파일에 출력을 쓸 수
귀하의 질문은 미미한 비 특이 사항입니다. 정확하게 분리하려는 것에 대해 자세히 설명해 주시겠습니까? – Sefe
내 질문이 업데이트되었습니다. 모든 것이 될 수 있습니다. 그것이 문제이다. 콘솔에서 볼 수있는 유일한 차이점은 텍스트의 색상입니다. – Lotok