Socket
Book a DemoInstallSign in
Socket

squad-logs

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

squad-logs

This library is designed for the game Squad, it will give you the ability to easily parse game logs. It is possible to read the file locally or protocol SFTP. I hope this will be useful to you!

latest
Source
npmnpm
Version
1.0.32
Version published
Weekly downloads
26
-3.7%
Maintainers
1
Weekly downloads
 
Created
Source

SquadLogs

This library is designed for the game Squad, it will give you the ability to easily parse game logs. It is possible to read the file locally or protocol SFTP. I hope this will be useful to you!

Installation

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js.

If this is a brand new project, make sure to create a package.json first with the npm init command.

Installation is done using the

$ npm install squad-logs

or

$ yarn add squad-logs

Quick Start

SFTP

import { LogsReader } from 'squad-logs';

(async () => {
  const logsReader = new LogsReader({
    id: 1,
    autoReconnect: true,
    readType: 'remote',
    adminsFilePath: '/SquadGame/ServerConfig/Admins.cfg',
    filePath: '/SquadGame/Saved/Logs/SquadGame.log',
    host: '127.0.0.1',
    username: 'root',
    password: '123456',
  });

  await logsReader.init();

  const admins = await logsReader.getAdminsFile();

  logsReader.on('PLAYER_CONNECTED', (data) => {
    console.log(data);
  });
})();

LOCAL

import { LogsReader } from 'squad-logs';

(async () => {
  const logsReader = new LogsReader({
    id: 1,
    autoReconnect: true,
    readType: 'local',
    adminsFilePath: '/SquadGame/ServerConfig/Admins.cfg',
    filePath: '/SquadGame/Saved/Logs/SquadGame.log',
  });

  await logsReader.init();

  const admins = await logsReader.getAdminsFile();

  logsReader.on('PLAYER_CONNECTED', (data) => {
    console.log(data);
  });
})();

Events

EventReturnType
ADMIN_BROADCASTresponseTAdminBroadcast
DEPLOYABLE_DAMAGEDresponseTDeployableDamaged
NEW_GAMEresponseTNewGame
PLAYER_CONNECTEDresponseTPlayerConnected
PLAYER_DISCONNECTEDresponseTPlayerDisconnected
PLAYER_DAMAGEDresponseTPlayerDamaged
PLAYER_DIEDresponseTPlayerDied
PLAYER_POSSESSresponseTPlayerPossess
PLAYER_UNPOSSESSresponseTPlayerUnpossess
PLAYER_REVIVEDresponseTPlayerRevived
PLAYER_SUICIDEresponseTPlayerSuicide
PLAYER_WOUNDEDresponseTPlayerWounded
PLAYER_ACCEPTING_CONNECTIONresponseTNotifyAcceptingConnection
ROUND_WINNERresponseTRoundWinner
ROUND_ENDEDresponseTRoundEnded
ROUND_TICKETSresponseTRoundTickets
SQUAD_CREATEDresponseTSquadCreated
VEHICLE_DAMAGEDresponseTVehicleDamaged
TICK_RATEresponseTTickRate
connectednullnull
closenullnull

FAQs

Package last updated on 16 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts