samp.directory
← Skripte und Bibliotheken

Southclaws/samp-nolog

SA:MP server plugin to prevent writing to server_log.txt

Plugin★ 4aktualisiert Juni 2018MITCMakesampctlArchiviert
Auf GitHub öffnen

Der Autor hat dieses Repository archiviert, es wird also nicht mehr gepflegt.

Mit sampctl installieren

sampctl package install Southclaws/samp-nolog

Führe das in deinem Projektordner aus. sampctl lädt das Paket und alles herunter, wovon es abhängt.

Im Pawn-Compiler ausprobieren →

Fügt seine Include-Dateien samt der Bibliotheken, von denen es abhängt, dem Pawn-Compiler in deinem Browser hinzu, bereit zum Einbinden in ein Skript.

Hängt von 1 Paket ab

Verwendet von 1 Paket

README.md

nolog

This is a plugin for SA:MP that blocks logging to server_log.txt.

It uses Zeex/subhook to hook logprintf and redirect it to a function that does the printf without the log.

Why

Why would you want to block logging to server_log.txt?

"Log Bleed" Vulnerability

RCON can be used to read information being written to logs via a vulnerability in the existing logprintf implementation. This plugin protects you from this vulnerability.

You should never log sensitive information anyway however logs being available to outsiders is still not desirable.

Engineering Reasons

Because individual log files are not

  • scalable
  • easily managable
  • portable

It's also not standard for a Linux app to log to STDOUT and a file. If I want to log to a file, I'd just pipe it.

This also removes the IO overhead of writing to the log file - which happens on the main thread.

With this plugin loaded, all your output comes out of STDOUT and you can do as you please with it:

  • use maddinat0r/samp-log
  • send to a logging service (see below)
  • watch for "error", "warning", "debug" and send an Email or Discord message to alert your team to issues
  • pipe it to /dev/null and live life on the edge
Logging Services

Logging is important and there are entire infrastructures dedicated to handling application logs. SA:MP can take advantage of these tools too.

For the oldschool sysadmins, syslog is probably what you are used to. Since SA:MP outputs via stdout, you can easily set up a standard systemd unit file and use journald to manage your logs.

If you're interested in accessing logs frequently for administration or market research purposes, I'd highly recommend the "ELK Stack". It gets the name from the technologies it uses: Elasticsearch, Logstash and Kibana.

An alternative to this would be using Prometheus and Grafana with a custom node exporter for SA:MP data.

pawn-packagesa-mpsa-mp-plugin

Diese Seite wird aus dem erstellt, was GitHub über das Repository veröffentlicht. samp.directory hostet den Code nicht. Ein Problem mit diesem Eintrag melden

Southclaws/samp-nolog: SA-MP Plugin | samp.directory