$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.234

Latest news

  • ProcessWire Weekly #511
    In the 511th issue of ProcessWire Weekly we'll cover the latest core updates, introduce a new third party module called Auto AVIF, and more. Read on!
    Weekly.pw / 25 February 2024
  • 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

“Yesterday I sent the client a short documentation for their ProcessWire-powered website. Today all features already used with no questions. #cmsdoneright—Marc Hinse, Web designer/developer