Enables creation of logs, logging of events, and management of logs.

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the WireLog class also inherits all the methods and properties of: Wire.

Show class?             Show args?        

Common

NameReturnSummary 
WireLog::error(string $text)
Wire WireLogRecord an error message in the error log (errors.txt) 
WireLog::message(string $text)
Wire WireLogRecord an informational or 'success' message in the message log (messages.txt) 
WireLog::save(string $name, string $text)
boolSave text to a named log
WireLog::warning(string $text)
Wire WireLogRecord a warning message in the warnings log (warnings.txt) 

Retrieval

NameReturnSummary 
WireLog::getEntries(string $name)
arrayReturn given number of entries from end of log file, with each entry as an associative array of components 
WireLog::getFilename(string $name)
stringGet the full filename (including path) for the given log name 
WireLog::getLines(string $name)
arrayReturn the given number of entries from the end of log file 
WireLog::getLogs()
arrayReturn array of all logs, sorted by name 
WireLog::getTotalEntries(string $name)
intGet the total number of entries present in the given log 

Manipulation

Additional methods and properties

In addition to the methods and properties above, WireLog also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.123

Twitter updates

  • New post: In this week’s post, we’ll take a look a look at the new website and focus on some parts of it and how they were built. Then we’ll dive into the latest version of ProcessWire on the dev branch, version 3.0.124— More
    11 January 2019
  • New ProcessWire main site rebuild ready for preview— More
    4 January 2019
  • Happy Holidays! This latest master version of ProcessWire contains hundreds of new additions, fixes, optimizations and more. This post covers all the highlights— More
    21 December 2018

Latest news

  • ProcessWire Weekly #244
    In the 244th issue of ProcessWire Weekly we'll cover the latest core updates, introduce the new processwire.com site, ask a PHP version related question in the weekly poll, and showcase the site of an open source room bookings app. Read on!
    Weekly.pw / 12 January 2019
  • ProcessWire 3.0.124 and new website launched
    In this week’s post, we’ll take a look a look at the new website and focus on some parts of it and how they were built. Then we’ll dive into the latest version of ProcessWire on the dev branch, version 3.0.124.
    Blog / 11 January 2019
  • Subscribe to weekly ProcessWire news

“…building with ProcessWire was a breeze, I really love all the flexibility the system provides. I can’t imagine using any other CMS in the future.” —Thomas Aull