smbache / loggr

Easy and flexible logging for R
Other
79 stars 6 forks source link

log_file does not work when `source`d #4

Closed smbache closed 9 years ago

smbache commented 9 years ago

log_file only works in the environment from which it is called, and therefore has no effect when in a script which is sourced.

If log_file is executed outside of source it works, even if the remainder of the script is sourced.

Scripts executed with R CMD BATCH and Rscript works fine.

Not sure there is a way to fix things with source though.

smbache commented 9 years ago

Fixed via 3c90acf41dcdab47bddd9684fb722a880bff42cd