Logging PHP query examples for the Wowza Streaming Engine REST API

Wowza Streaming Engine media server software includes a REST Application Programming Interface (API) that you can use to configure, manage, and monitor the media server through HTTP requests. This article describes how to collect logging information for a Wowza Streaming Engine media server by using PHP to query the Wowza Streaming Engine REST service.

Notes:

Contents


Get log lines from a log file
Search log files
For developers

Get log lines from a log file


To get log lines from a specific log file, you must get a list of log files before requesting the lines.
 
  1. To get a list of log files, use the following request:
    $sf = new Com\Wowza\Logging();
    $response = $sf->getNewestFirst();
  2. Then, request log lines from a corresponding file using lineCount to specify the total number of log lines to return:
    $sf = new Com\Wowza\Logging();
    $response = $sf->getLineCount(10);

Search log files


To search a corresponding log file, use the request below and replace [search-string] with your search parameters:
$sf = new Com\Wowza\Logging();
$response = $sf->search("[search-string]");

For developers


Source code is available on GitHub.

Wowza Media Systems™ provides developers with a platform to create streaming applications and solutions. See Wowza Developer Tools to learn more about our APIs and SDK.