logisch
v1.2.0
Published
Generic Log Parsing
Readme
Logisch
Built for www.logier.dev
Description
logisch is a log parsing engine built with TypeScript. It transforms raw, unstructured log lines from various operating systems, databases, and application frameworks into typed, predictable LogEntry structures.
The package is optimized for bundlers and supports modern subpath exports, allowing you to import only the specific parsers your application needs without bloat.
Available Subpath Modules
You can import parsers individually to keep your production bundles minimal:
logisch/android- Android Logcat (Formats A & B)logisch/apache- Apache Server Error Logslogisch/bgl- IBM Blue Gene/L Supercomputer Logslogisch/json- Structured JSON Logs (pino, bunyan, winston, ...)logisch/linux- Linux System & Authentication Logslogisch/macos- Apple macOS Diagnostic Daemon Logslogisch/openssh- OpenSSH Daemon Security Auditslogisch/proxifier- Proxifier Network Traffic Logslogisch/spark- Apache Spark Data Engine Logslogisch/thunderbird- Thunderbird Cluster Topologieslogisch/windows- Windows CBS/CSI Servicing Logslogisch/zookeeper- Apache ZooKeeper Coordination Logslogisch/fallback- Heuristic Safety-Net Parser
Installation
npm install logischQuick Start
Using Specific Subpath Parsers
import { ApacheParser } from "logisch/apache";
const parser = new ApacheParser();
const line = '[Sun Dec 04 04:47:44 2005] [notice] workerEnv.init() ok';
if (parser.canParse(line)) {
const logEntry = parser.parse(line, line);
console.log(logEntry);
}Local Dev Setup
Follow these steps to set up the project locally for development:
Clone the repo:
git clone https://github.com/aspecsweb/logisch.gitNavigate to the project directory
cd logischInstall dependencies
npm installLink for local application development:
To test changes live inside your frontend application without publishing, use npm link
Then, in your web app's root directory, run: npm link logisch
Build the package: npm run build
Testing & Linting
npm test # Run the test suite once
npm run test:watch # Re-run tests on file changes
npm run test:coverage # Run tests with coverage report
npm run lint # Lint the src directory
npm run lint:fix # Lint and auto-fixContributing
New parsers, heuristic improvements, and performance work are welcome. See CONTRIBUTING.md for how to add a new parser module and expose it as a subpath export.
