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.
View a list of log files on a server. You can optionally 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/{serverName}/logfiles?order=newestFirst"View details of a specific log file:
curl -X GET \
-H 'Accept:application/json; charset=utf-8' \
-H 'Content-Type:application/json; charset=utf-8' \
"http://localhost:8087/v2/servers/{serverName}/logfiles/{logName}"You can restrict the amount returned by using the lineCount parameter to specify the total number of log lines to return. The following call returns the wowzastreamingengine_access.log with the results limited to 100 lines:
curl -X GET \
-H 'Accept:application/json; charset=utf-8' \
-H 'Content-Type:application/json; charset=utf-8' \
"http://localhost:8087/v2/servers/{serverName}/logfiles/wowzastreamingengine_access.log?lineCount=100"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/{serverName}/logfiles/{logName}?search={string-to-search}"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.