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

Is there a way for Timbre to create log location on disk if it does not exist ? #93

Closed
rossajmcd opened this issue Feb 16, 2015 · 4 comments

Comments

@rossajmcd
Copy link
Contributor

I may have missed this, but I did not spot it in the readme, or with a quick glance over the API docs.

Thanks.

@ptaoussanis
Copy link
Member

Hi Ross,

Not currently. You'll normally want to do that with something like a bash script or some Java, e.g:

(import java.io.File)
(defn exists? [path] (when-not (str/blank? path) (.exists (File. ^String path))))
(defn mkdirs "Creates all parent directories for the passed file."
  [^File f] (.mkdirs (.getParentFile (.getCanonicalFile f))))

Does that help?

@rossajmcd
Copy link
Contributor Author

Hi.

Yes thanks, I was just being lazy, seeing if this was already handled :-)

@ptaoussanis
Copy link
Member

Tbh it's something that the file-based appenders should probably already be doing automatically. If they're not, would be happy to accept a PR that added this. I don't use/maintain any of the file appenders myself so not actually sure how they work currently :-)

@ptaoussanis
Copy link
Member

This will be addressed in v4, closing.

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