{"id":48413,"library":"logpilot-lite-client","title":"LogPilot-Lite Client","description":"LogPilot-Lite Client is an official TypeScript gRPC client for the LogPilot-Lite log management server, version 1.0.1. It enables Node.js applications to produce and consume logs with automatic offset management. The package ships TypeScript types and supports modern Node.js (20+). Key differentiators include a simple producer/consumer API for streaming logs, built-in offset tracking, and storage options (sqlite as default) for persistent log consumption.","status":"active","version":"1.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/danpung2/LogPilot-Lite-Client","tags":["javascript","log","grpc","client","logpilot","typescript"],"install":[{"cmd":"npm install logpilot-lite-client","lang":"bash","label":"npm"},{"cmd":"yarn add logpilot-lite-client","lang":"bash","label":"yarn"},{"cmd":"pnpm add logpilot-lite-client","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This is a named export, not a default export. CommonJS users should use: const { LogPilotProducer } = require('logpilot-lite-client').","wrong":"import LogPilotProducer from 'logpilot-lite-client'","symbol":"LogPilotProducer","correct":"import { LogPilotProducer } from 'logpilot-lite-client'"},{"note":"LogPilotConsumer is a named export; destructuring is preferred.","wrong":"import * as logpilot from 'logpilot-lite-client'; const consumer = new logpilot.LogPilotConsumer(...)","symbol":"LogPilotConsumer","correct":"import { LogPilotConsumer } from 'logpilot-lite-client'"},{"note":"LogEntry is a TypeScript type; use type-only import when only using it as a type to avoid runtime inclusion.","wrong":"import { LogEntry } from 'logpilot-lite-client'","symbol":"LogEntry","correct":"import type { LogEntry } from 'logpilot-lite-client'"}],"quickstart":{"code":"import { LogPilotProducer, LogPilotConsumer } from 'logpilot-lite-client';\n\nasync function demo() {\n  // Producer: send a log\n  const producer = new LogPilotProducer(process.env.GRPC_SERVER_ADDRESS ?? 'localhost:50051');\n  await producer.produce({ channel: 'orders', level: 'INFO', message: 'Order created', meta: { userId: 'user-1' } });\n\n  // Consumer: read logs\n  const consumer = new LogPilotConsumer({\n    serverAddress: process.env.GRPC_SERVER_ADDRESS ?? 'localhost:50051',\n    channel: 'orders',\n    consumerId: 'demo-service',\n    storage: 'sqlite'\n  });\n  const logs = await consumer.consume(10);\n  logs.forEach(log => console.log(log.message));\n}\ndemo().catch(console.error);","lang":"typescript","description":"Illustrates producing a log entry to a gRPC server and consuming logs with offset management."},"warnings":[{"fix":"Ensure `meta` is provided only once in the object: `meta: { userId: 'user-1' }`.","message":"The `produce` method accepts `meta` as an optional field, but the README shows duplicate `meta` keys in the example object (a syntax error). This could cause confusion or runtime errors if copied verbatim.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Upgrade Node.js to version 20 or later.","message":"Node.js 20+ is required; older versions may not work due to modern language features.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Implement manual error handling and consider custom offset management if exactly-once processing is required.","message":"Consumer offset is automatically committed after each consume() call. If processing fails, logs may be skipped.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Install regular gRPC dependencies: npm install @grpc/grpc-js @grpc/proto-loader","message":"The package depends on gRPC, which may require native compilation. Ensure your environment has build tools installed.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.0.1':24 '20':47 'api':54 'applic':28 'automat':35 'built':59 'built-in':58 'client':4,8,14,76 'consum':32 'consumpt':72 'default':68 'differenti':49 'enabl':26 'grpc':13,75 'includ':50 'javascript':73 'key':48 'lite':3,7,19 'log':20,33,57,71,74 'logpilot':2,6,18,77 'logpilot-lit':1,5,17 'manag':21,37 'modern':45 'node.js':27,46 'offici':11 'offset':36,61 'option':65 'packag':39 'persist':70 'produc':30 'producer/consumer':53 'server':22 'ship':40 'simpl':52 'sqlite':66 'storag':64 'stream':56 'support':44 'track':62 'type':42 'typescript':12,41,78 'version':23","created_at":"2026-06-07T16:56:31.657308+00:00","updated_at":"2026-06-07T16:56:31.657308+00:00","problems":[{"fix":"Run `npm install logpilot-lite-client` and ensure the import path is correct (no extensions or subpaths).","cause":"Missing installation or incorrect module path.","error":"Error: Cannot find module 'logpilot-lite-client'"},{"fix":"Ensure LogPilot-Lite server is running on the configured address (default localhost:50051). Use `serverAddress` option correctly.","cause":"gRPC server is not running or unreachable.","error":"Error: 14 UNAVAILABLE: Connection dropped"},{"fix":"Use named import `{ LogPilotConsumer }` and ensure version >=1.0.0.","cause":"Using incorrect import or older version without consume method.","error":"TypeError: consumer.consume is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/danpung2/LogPilot-Lite-Client","github":"https://github.com/danpung2/LogPilot-Lite-Client","docs":null,"changelog":null,"pypi":null,"npm":"logpilot-lite-client","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}