smbache / loggr

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

Cannot open file [...] No such file or directory #28

Open abeburnett opened 7 years ago

abeburnett commented 7 years ago

Hi there,

Love the simple logging utility for R. Say, I'm currently getting a weird error--weird because I can see loggr create the log file, and I can see it writing to the log file. Yet, I'm seeing constant warning messages in the console (very annoying!) which say that it cannot open the log file and that there's no such file or directory. Clearly it can open the file because it is opening the file and writing to it.

Thoughts?

library(loggr)
# setup logging
log_file(paste0("logs/gravity_well_",Sys.Date(),".log"), overwrite = FALSE)
> log_debug("HELLO")
Warning message:
In file(file, ifelse(append, "a", "w")) :
  cannot open file '/logs/gravity_well_2017-04-06.log': No such file or directory

File permissions are: -rw-r--r-- 1 abe-burnett abe-burnett 371 Apr 6 21:29 gravity_well_2017-04-06.log

abeburnett commented 7 years ago

https://www.dropbox.com/s/xadzbv1mm3qgg2c/Screenshot%202017-04-06%2015.34.01.png?dl=0

smbache commented 7 years ago

Sounds weird and a bit hard to reproduce. Could you debug the file function to step through what happens?