Last active
October 9, 2019 18:13
-
-
Save dhruvr/a27b84017ee9c66ef486ecb331eab436 to your computer and use it in GitHub Desktop.
Revisions
-
dhruvr revised this gist
Oct 9, 2019 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,17 +1,17 @@ //f represnts io.file // incase I don't need lumberjack and want to // write to both Stdout and file multi := io.MultiWriter(os.Stdout, f) l := ConfigureLogrus(multi) // in case I don't need lumberjack and want to // write to file only l := ConfigureLogrus(f) // incase I don't need lumberjack and want to // write to stdout only l := ConfigureLogrus(os.Stdout) -
dhruvr created this gist
Sep 21, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ //f represnts io.file // incase in I don't need lumberjack and want to // write to both Stdout and file multi := io.MultiWriter(os.Stdout, f) l := ConfigureLogrus(multi) // in case in I don't need lumberjack and want to // write to file only l := ConfigureLogrus(f) // incase in I don't need lumberjack and want to // write to stdout only l := ConfigureLogrus(os.Stdout) //in case I want lumberjack and stdout //lets say l is logrus instance multi := io.MultiWriter(os.Stdout, l) j := ConfigureLogrus(l) and so on.