https://github.com/rcontf/srcds-logs
A cross-runtime compatible TF2/SRCDS log receiver
https://github.com/rcontf/srcds-logs
csgo hacktoberfest hacktoberfest2025 log-receiver minecraft rcon srcds teamfortress2 tf2
Last synced: 24 days ago
JSON representation
A cross-runtime compatible TF2/SRCDS log receiver
- Host: GitHub
- URL: https://github.com/rcontf/srcds-logs
- Owner: rcontf
- License: mit
- Created: 2023-04-23T22:31:42.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-12-15T02:55:36.000Z (about 2 months ago)
- Last Synced: 2025-12-17T20:17:10.853Z (about 2 months ago)
- Topics: csgo, hacktoberfest, hacktoberfest2025, log-receiver, minecraft, rcon, srcds, teamfortress2, tf2
- Language: TypeScript
- Homepage: https://jsr.io/@c43721/srcds-log-receiver
- Size: 66.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tf2-devs - rcontf/srcds-logs - typescript - library for interacting with the srcds udp protocol (Table of contents / Hosting)
README
# srcds-logs
Wrapper around [Source Dedicated Server](https://developer.valvesoftware.com/wiki/Source_Dedicated_Server) UDP log streams for node.
## Set Up
Your server must have logs enabled. To do so, run `log on` in your server console or through RCON. In order to receieve messages, you must also add a log address using `logaddress_add` command to add the URL or IP of your server's receiver.
To delete a destination, use `logaddress_del`.
You can always list existing addresses using `logaddress_list`.
## Installation
See https://jsr.io/@c43721/srcds-log-receiver for more details.
### Usage
You can define a receiver and listen to messages published to the UDP stream.
```ts
import { LogReceiver } from "@c43721/srcds-log-receiver";
const receiver = new LogReceiver({
address: "0.0.0.0",
port: 9871,
});
console.log("Log receiver running.. ");
receiver.on("event", (message) => console.log(message));
```
### Security
In order to make this as extendable as possible, there is no built in security. However, you can mitigate this by using `sv_logsecret` and checking for the password in the packet. Otherwise, you can use the Socket information to determine
what IPs sent the message.
### Examples
For more examples, see documentation or the examples folder.
## Contributing
If there's a feature or bug, please raise a github issue first alongside your PR (if you're kind enough to make a PR.)
## License
Distributed under the MIT License. See [LICENSE](LICENSE) for more information.