Homec4science

Allow PhutilDeferredLog to have no path on disk

Authored by epriestley <git@epriestley.com> on Apr 2 2013, 18:52.

Description

Allow PhutilDeferredLog to have no path on disk

Summary:
Ref T2860. Ref T2870. We have a few pieces of debugging/developer code which read information out of the Phabricator access log, but we don't guarantee that it exists.

Allow it to have null as a file to write to, which means "don't write to disk", so we can guarantee it exists and the object can be used in other ways by the application.

Arguably this is a little goofy since we're using the object as a key-value store, but the nature of the deferred log (which must exist for the duration of the application, and must accumulate values as execution proceeds so that it can write as often and as much as possible) means that it's fairly well-suited to such use.

Test Plan: Added unit tests.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2860, T2870

Differential Revision: https://secure.phabricator.com/D5532

Details

Committed
epriestley <git@epriestley.com>Apr 2 2013, 18:52
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUfcc8bd48cf49: Fix uri generation when provided relative path
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU9f8792b43425: Allow PhutilDeferredLog to have no path on disk (authored by epriestley <git@epriestley.com>).Apr 2 2013, 18:52