Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/neuecc/EtwStream
Browse files Browse the repository at this point in the history
  • Loading branch information
neuecc committed May 25, 2016
2 parents 1fd0440 + 5c977cb commit f5d0695
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ ObservableEventListener is simple wrapper of `EventListener` and `TraceEvent(Mic
| LogToConsole | Output by Console.WriteLine with colored.
| LogToDebug | Output by Debug.WriteLine.
| LogToTrace | Output by Trace.WriteLine.
| LogToFile | Output to flat file by true asynchronous I/O's high performance sink.
| LogToRollingFile | Output to flat file with file rotate rule by true asynchronous I/O's high performance sink.
| LogToFile | Output to flat file.
| LogToRollingFile | Output to flat file with file rotate.
| LogTo | LogTo is helper for multiple subscribe.

> How to make original Sink? I recommend log to Azure EventHubs, AWS Kinesis, BigQuery Streaming insert directly. Log to file is legacy way! Document is not available yet. Please see [Sinks](https://github.com/neuecc/EtwStream/tree/master/EtwStream.Core/Sinks) codes and please here to me.
> How to make original Sink? I recommend log to Azure EventHubs, AWS Kinesis, BigQuery Streaming insert directly. Log to file is legacy way! Document is not available yet. Please see [Sinks](https://github.com/neuecc/EtwStream/tree/master/EtwStream/Sinks) codes and please here to me.
> EtwStream's FileSink is fastest file logger, I'll show benchmark results.
Expand Down Expand Up @@ -124,8 +124,9 @@ ObservableEventListener.FromTraceEvent("SampleEventSource")
// RollingFile:
// fileNameSelector's DateTime is date of file open time, int is number sequence.
// timestampPattern's DateTime is write time of message. If pattern is different then roll new file.
// timestampPattern must be integer at last word.
var d1 = xs.LogToRollingFile(
fileNameSelector: (dt, i) => $@"{dt.ToString("yyyyMMdd")}Log-{i}.log",
fileNameSelector: (dt, i) => $@"{dt.ToString("yyyyMMdd")}_MyLog_{i.ToString("00")}.log",
timestampPattern: x => x.ToString("yyyyMMdd"),
rollSizeKB: 10000,
messageFormatter: x => x.DumpPayloadOrMessage(),
Expand Down

0 comments on commit f5d0695

Please sign in to comment.