File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -39,11 +39,15 @@ public bool Initialize() {
3939 counter ++ ;
4040 }
4141
42+ // prepare columns
43+ List < string > _columns = new List < string > ( columns ) ;
44+
4245 eventWriter = new StreamWriter ( new FileStream ( filePath , FileMode . Create ) , Encoding . UTF8 ) ;
46+
4347 // Header Line, if any columns are added to `columns`
44- if ( columns . Count > 0 ) {
45- if ( writeUnixTime ) columns . Insert ( 0 , "unix_ms" ) ;
46- eventWriter . WriteLine ( String . Join ( ',' , columns ) ) ;
48+ if ( _columns . Count > 0 ) {
49+ if ( writeUnixTime ) _columns . Insert ( 0 , "unix_ms" ) ;
50+ eventWriter . WriteLine ( String . Join ( ',' , _columns ) ) ;
4751 }
4852
4953 _is_active = true ;
@@ -53,7 +57,7 @@ public bool Initialize() {
5357
5458 public bool WriteLine ( ) {
5559 if ( payload . Count == 0 ) return false ;
56- WriteLine ( String . Join ( "," , payload ) ) ;
60+ WriteLine ( String . Join ( "," , payload ) , writeUnixTime ) ;
5761 payload = new List < string > ( ) ;
5862 return true ;
5963 }
You can’t perform that action at this time.
0 commit comments