$log->warning() method

Record a warning message in the warnings log (warnings.txt)


// Log an warning message to warnings.txt log
$log->warning("This is a warning");


// basic usage
$wire = $log->warning(string $text);

// usage with all arguments
$wire = $log->warning(string $text, $flags = 0);



Text to save in the log

flags (optional)int, bool

Specify boolean true to also display the warning interactively (admin only).

Return value

Wire WireLog

$log methods and properties

API reference based on ProcessWire core version 3.0.228

Latest news

  • ProcessWire Weekly #498
    The 498th issue of ProcessWire Weekly brings in all the latest news from the ProcessWire community. Modules, sites, and more. Read on!
    Weekly.pw / 25 November 2023
  • Using date range fields in ProcessWire
    This week we'll take a detailed look at the newest addition to the ProFields set of modules: the Date Range Fieldtype and Inputfield.
    Blog / 24 November 2023
  • Subscribe to weekly ProcessWire news

“The end client and designer love the ease at which they can update the website. Training beyond how to log in wasn’t even necessary since ProcessWire’s default interface is straightforward.” —Jonathan Lahijani