basically the need is to log all outputs from 'println’s. Existing loggers seem to aim at dealing with specific messages annotated with info, warn, etc. So they are not ideal.
The redirect io in Base is not helpful because you either print into file, or show in console. But not both.
julia> using PrintLog
julia> @printlog "bf.log"
INFO: `print` and `println` will be logged into file `bf.log`
julia> println("fanfan")
fanfan
julia> @noprintlog
INFO: `print` and `println` are resumed.
Then a log file bf.log will be created, and contents appended.
To suppress the INFO: ..., add a silent keyword in the macro
julia> using PrintLog
julia> @printlog "bf.log" silent
julia> println("fan")
fan
julia> @noprintlog silent