Ts3 Php Framework Get Log

Hello guys,
I am using ts3 php framework of ts3. I want to upload logs to the site (as in Yatqa). How can I do?

The framework I use: https://github.com/planetteamspeak/ts3phpframework

@Ts.ChrisR

1 Like

You can use the logView() method on your server and/or host object to retreive lines from your log files.

https://docs.planetteamspeak.com/ts3/php/framework/class_team_speak3___node___server.html#a9631a325e4190606c74cde1a1fbd91fa

Use the last_pos field from the first result row and pass it to subsequent queries to get the next batch of log entries.

Additionally, there’s a static helper function to split up log entries:

https://docs.planetteamspeak.com/ts3/php/framework/class_team_speak3___helper___convert.html#a19bcea30496c0b752cacfab2b211d958

3 Likes

logView (); Do you have a chance to throw a sample code of the command?
I guess I’m doing wrong somewhere

This should work:

// load framework files
require_once("libraries/TeamSpeak3/TeamSpeak3.php");

// connect to local server, authenticate and spawn an object for the virtual server on port 9987
$server = TeamSpeak3::factory("serverquery://username:[email protected]:10011/?server_port=9987");

// query latest 100 lines from server log
$logs = $server->logView(100);
2 Likes


this is not working

I installed ts3 on a port which is 9987, the port of the framework question is = 9988 and I pulled the logs.
When I try to pull logs on port 9987, it gives an error. ( error: 2052: file input/output error)

twitch instagram twitter facebook