Page MenuHomePhabricator

Create log directory if it does not exist
ClosedPublic

Authored by joshuaspence on Feb 10 2015, 7:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 4, 6:51 PM
Unknown Object (File)
Wed, May 1, 12:16 AM
Unknown Object (File)
Tue, Apr 23, 4:22 AM
Unknown Object (File)
Sat, Apr 20, 12:46 AM
Unknown Object (File)
Wed, Apr 10, 11:57 PM
Unknown Object (File)
Apr 4 2024, 4:39 PM
Unknown Object (File)
Apr 4 2024, 4:31 PM
Unknown Object (File)
Apr 4 2024, 3:49 PM
Subscribers

Details

Summary

Create log directory if it does not exist. In particular, I want to check log.access.path if it does not exist.

Test Plan

Saw the log directory created.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

joshuaspence retitled this revision from to Create log directory if it does not exist.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence edited edge metadata.
epriestley edited edge metadata.
epriestley added inline comments.
src/filesystem/PhutilDeferredLog.php
71

Maybe consider passing ..., 0755, true to try to create it recursively.

This revision is now accepted and ready to land.Feb 10 2015, 2:21 PM

Do you think that maybe the directory creation should happen in write()?

joshuaspence edited edge metadata.

Recursively create directory

Since setFile() exists and could change the file location, probably.

This revision was automatically updated to reflect the committed changes.