steam-condenser icon indicating copy to clipboard operation
steam-condenser copied to clipboard

Logging endpoint for game servers

Open koraktor opened this issue 12 years ago • 7 comments

GoldSrc and Source servers are able to redirect their log messages to one or more logging endpoints using the log on and logaddress_add CVARs.

The servers will send packets of the types S2A_LOGSTRING (0x52) and S2A_LOGKEY (0x53).

koraktor avatar Dec 30 '12 14:12 koraktor

That's a pretty cool idea. Would that work with PHP or is it limited to the other methods?

ghoeffner avatar Feb 20 '13 09:02 ghoeffner

As always, I'll try to provide equal support for all three implementations.

koraktor avatar Feb 20 '13 10:02 koraktor

Oh this isn't part of the library yet? And I was just looking for that :/

PS: PHP might be a challenge in that regard as PHP usually isn't running in an infinite runtime environment which would be required to keep the socket open. If it's not going to work out one might need to use NodeJS to do some cache proxy trick...

neico avatar Jan 14 '15 05:01 neico

This would be a very useful feature, one of the main reasons I would choose to use steam-condenser.

MingweiSamuel avatar Mar 08 '15 23:03 MingweiSamuel

Any news on this?

Hackmastr avatar Jun 28 '17 07:06 Hackmastr

I think this probably may find its way into a separate project. Using only a single language (probably not PHP) and probably not using code from Steam Condenser.

Any suggestions? @IAMONSYS, @neico, @MingweiSamuel, @Hackmastr

koraktor avatar Jun 29 '17 12:06 koraktor

No PHP? That would suck :P

I'm using Datagram to get logs now:

$loop = React\EventLoop\Factory::create();

$factory = new React\Datagram\Factory($loop);

$factory->createServer("{$bind_addr}:{$bind_port}")->then(function (React\Datagram\Socket $server) use ($addr, $port){
    $server->send('hello', "{$addr}:{$port}"); // Must send a message to the server
    $server->on('message', function($message, $address, $server) use ($addr, $port){
        $message = substr($message, 7); // Remove weird characters at beginning
        $message = str_replace(array("\0", "\r"), '', $message);
        echo $message ;
    });
});
$loop->run();

Would be nice to have all in one package :+1:

Hackmastr avatar Jun 29 '17 13:06 Hackmastr