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';
const logsEmitter = LogsReader({
remoteFilePath: '/SquadGame/Saved/Logs/SquadGame.log',
host: '127.0.0.1',
username: 'root',
password: 'password',
});
logsEmitter.on('PLAYER_CONNECTED', (data) => {
console.log(data);
});
LOCAL (TOOOODOOOOOOOO)
import { LogsReader } from 'squad-logs';
const logsEmitter = LogsReader({
localFilePath: '/SquadGame/Saved/Logs/SquadGame.log',
});
logsEmitter.on('PLAYER_CONNECTED', (data) => {
console.log(data);
});