From bc154dd1c80dfe7919f01cead64e93a040ed0253 Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Tue, 13 Dec 2011 01:23:02 +0000 Subject: [PATCH] Add shortfile option for console logging To reduce the width of console log messages, add an field to display the filename without full path info. --- source/lib/SihnonFramework/Log/Plugin/Console.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/source/lib/SihnonFramework/Log/Plugin/Console.class.php b/source/lib/SihnonFramework/Log/Plugin/Console.class.php index 565e791..d56017a 100644 --- a/source/lib/SihnonFramework/Log/Plugin/Console.class.php +++ b/source/lib/SihnonFramework/Log/Plugin/Console.class.php @@ -34,6 +34,7 @@ class SihnonFramework_Log_Plugin_Console extends SihnonFramework_Log_PluginBase // Make some alterations for ease of display $fields_map['timestamp'] = date('d/m/y H:i:s', $fields_map['ctime']); + $fields_map['shortfile'] = basename($fields_map['file']); // split the map back out again now the modifications have been made $fields = array_keys($fields_map);