A modern, flexible, and extensible logging framework for JavaScript and TypeScript applications.
This project is in early development stages. APIs may change without notice, and not all features are fully implemented yet. Do not use in production environments.
LogScribe is a comprehensive logging system designed to provide powerful logging capabilities for both client-side and server-side JavaScript/TypeScript applications. It offers a flexible architecture that allows for customization and extension to meet various logging needs.
LogScribe is organized as a monorepo using pnpm workspaces, containing the following packages:
- @logscribe/api: Defines the core interfaces and types for the logging system
- @logscribe/core: Implements the core logging functionality
- @logscribe/server: Provides server-side integration for the logging system
- Multiple log levels (TRACE, DEBUG, INFO, NOTICE, WARNING, ERROR, FATAL)
- Various appenders for different output destinations:
- Console appender for browser/Node.js console output
- File appender for writing logs to files
- Terminal appender with color support
- HTTP appender for sending logs to a remote endpoint
- Null appender for disabling logging
- Customizable message formatting
- Hierarchical logger configuration
- Asynchronous logging support
- TypeScript-first design with full type safety
import { setUpLogging, consoleAppender } from "@logscribe/core";
import { LogLevel } from "@logscribe/api";
// Set up logging with console output
const [loggerFactory, shutdown] = await setUpLogging({
rootLevel: LogLevel.INFO,
appenders: [consoleAppender()]
});
// Create a logger
const logger = loggerFactory.createLogger("myApp");
// Log messages at different levels
logger.info("Application started");
logger.debug("This won't be logged because DEBUG < INFO");
logger.error("Something went wrong", new Error("Details here"));
// Shutdown logging when done
await shutdown();
See the guidelines.md file for detailed development guidelines, including:
- Code style and linting
- Commit message format
- Documentation standards
- Testing approach
- Package exports and imports
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2025 Michael Schantl & contributors