Use the Wowza Streaming Engine™ media server software REST API to retrieve and view the log files of a Wowza Streaming Engine instance.
Notes:
- Wowza Streaming Engine 4.3.0 or later is required.
- PHP examples for the tasks in this article are available in the tests folder of the PHP REST Library for Wowza Streaming Engine on GitHub.
- Reference documentation for the Wowza Streaming Engine REST API is available by using OpenAPI (Swagger), which you can download and install locally. See Access reference documentation for the Wowza Streaming Engine REST API.
Contents
Get a list of server log files
View a log file
Search a log file
Get a list of server log files
View a list of log files on a server (_defaultServer_ in this example). Specify the order parameter as newestFirst (the default) or oldestFirst.
curl -X GET \ -H 'Accept:application/json; charset=utf-8' \ -H 'Content-Type:application/json; charset=utf-8' \ "http://localhost:8087/v2/servers/_defaultServer_/logfiles?order=newestFirst"
View a log file
View details of a specific log file (wowzastreamingengine_access.log in this example). Use the lineCount parameter to specify the total number of log lines to return:
curl -X GET \ -H 'Accept:application/json; charset=utf-8' \ -H 'Content-Type:application/json; charset=utf-8' \ "http://localhost:8087/v2/servers/_defaultServer_/logfiles/wowzastreamingengine_access.log?lineCount=100"
Search a log file
Search a log file for specific text by specifying the text with the search parameter:
curl -X GET \ -H 'Accept:application/json; charset=utf-8' \ -H 'Content-Type:application/json; charset=utf-8' \ "http://localhost:8087/v2/servers/_defaultServer_/logfiles/wowzastreamingengine_access.log?search=[search-for-this-string]"
Note: Several other parameters allow you to customize the information you retrieve from a log file. In Swagger, go to the servers resource and view the GET /v2/servers/{serverName}/logfiles/{logName} endpoint for more information.