Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Return passed value from phlog()

Summary:
It is very handy to add logging just by wrapping value inside expression, e.g.

  list($a, $b) = phlog(f());

Test Plan:   $a = phlog('a');

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1933
  • Loading branch information...
commit db643ee9f5f524e7d2a0d5ed17292ebb6c6d23e9 1 parent 03fdf19
vrana authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/error/PhutilErrorHandler.php
View
6 src/error/PhutilErrorHandler.php
@@ -1,7 +1,7 @@
<?php
/*
- * Copyright 2011 Facebook, Inc.
+ * Copyright 2012 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@
* limitations under the License.
*/
-
/**
* Improve PHP error logs and optionally route errors, exceptions and debugging
* information to a central listener.
@@ -291,7 +290,7 @@ public static function dispatchErrorMessage($event, $value, $metadata) {
*
* @param wild Any value you want printed to the error log or other registered
* logs/consoles.
- * @return void
+ * @return wild Passed $value.
* @group error
*/
function phlog($value) {
@@ -314,6 +313,7 @@ function phlog($value) {
array('file' => $file,
'line' => $line,
'trace' => $trace));
+ return $value;
}
Please sign in to comment.
Something went wrong with that request. Please try again.