Coder Social home page Coder Social logo

samp-nolog's Introduction

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.

samp-nolog's People

Contributors

southclaws avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

samp-nolog's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.