Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
abeburnett opened this issue Apr 6, 2017 · 2 comments
Open

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

abeburnett opened this issue Apr 6, 2017 · 2 comments

Comments

@abeburnett
Copy link

abeburnett commented Apr 6, 2017

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
Copy link
Author

@smbache
Copy link
Owner

smbache commented Apr 6, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants