diff --git a/wire/modules/Process/ProcessLogger/ProcessLogger.module b/wire/modules/Process/ProcessLogger/ProcessLogger.module index ef465051..b408d043 100644 --- a/wire/modules/Process/ProcessLogger/ProcessLogger.module +++ b/wire/modules/Process/ProcessLogger/ProcessLogger.module @@ -69,8 +69,9 @@ class ProcessLogger extends Process { } public function ___execute() { + $log = $this->wire()->log; /** @var MarkupAdminDataTable $table */ - $table = $this->wire('modules')->get('MarkupAdminDataTable'); + $table = $this->wire()->modules->get('MarkupAdminDataTable'); $table->setEncodeEntities(false); $table->headerRow(array( $this->_x('Name', 'th'), @@ -78,24 +79,25 @@ class ProcessLogger extends Process { $this->_x('Entries', 'th'), $this->_x('Size', 'th'), )); - $logs = $this->wire()->log->getLogs(); - foreach($logs as $log) { - $logName = $log['name']; + $logInfos = $log->getLogs(true); + foreach($logInfos as $logInfo) { + $logName = $logInfo['name']; if(ctype_digit($logName)) $logName = " $logName"; $table->row(array( - $logName => "./view/$log[name]/", - "$log[modified] " . wireRelativeTimeStr($log['modified']), - $this->wire()->log->getTotalEntries($log['name']), - "$log[size] " . wireBytesStr($log['size']) + $logName => "./view/$logInfo[name]/", + "$logInfo[modified] " . wireRelativeTimeStr($logInfo['modified']), + $log->getTotalEntries($logInfo['name']), + "$logInfo[size] " . wireBytesStr($logInfo['size']) )); } - $cnt = count($logs); + $cnt = count($logInfos); + $icon = wireIconMarkup('tree', 'fw lg'); $out = - "
" .
"" . $this->_('Create or add to log file from the API:') . "
" .
- "wire('log')->save('name', 'entry text');
" .
+ "wire()->log->save('name', 'entry text');
" .
"