diff --git a/README.md b/README.md index 6ccbfff..a426491 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# NextLogger +# nexlog -NextLogger is simple, effective, and zero-dependency logging library for Next.js, compatible with server, browser, and edge environments. Built entirely with Bun. +nexlog is a simple, effective, and zero-dependency logging library for Next.js, compatible with server, browser, and edge environments. Built entirely with Bun. -![CI/CD](https://github.com/Arakiss/nextlogger/actions/workflows/ci-cd.yml/badge.svg) -![npm version](https://img.shields.io/npm/v/nextlogger.svg) -![License](https://img.shields.io/npm/l/nextlogger.svg) +![CI/CD](https://github.com/Arakiss/nexlog/actions/workflows/ci-cd.yml/badge.svg) +![npm version](https://img.shields.io/npm/v/nexlog.svg) +![License](https://img.shields.io/npm/l/nexlog.svg) ## Features @@ -19,29 +19,29 @@ NextLogger is simple, effective, and zero-dependency logging library for Next.js ## Why Bun? -I've built NextLogger using [Bun](https://bun.sh), an all-in-one JavaScript runtime & toolkit designed for speed. Bun provides: +I've built nexlog using [Bun](https://bun.sh), an all-in-one JavaScript runtime & toolkit designed for speed. Bun provides: - Fast JavaScript/TypeScript runtime - Built-in bundler - Integrated test runner - Node.js-compatible package manager -By leveraging Bun's comprehensive toolkit, I've been able to develop, test, run, and bundle NextLogger without any external dependencies. This ensures a lightweight, fast, and reliable logging solution for your Next.js projects. +By leveraging Bun's comprehensive toolkit, I've been able to develop, test, run, and bundle nexlog without any external dependencies. This ensures a lightweight, fast, and reliable logging solution for your Next.js projects. ## Installation ```bash -npm install nextlogger +npm install nexlog # or -yarn add nextlogger +yarn add nexlog # or -bun add nextlogger +bun add nexlog ``` ## Usage ```typescript -import logger from 'nextlogger'; +import logger from 'nexlog'; // Set log level (optional) logger.setLogLevel('info'); @@ -91,13 +91,13 @@ Browser/Edge environment: ## Environment Detection -NextLogger automatically detects the current environment (server, browser, or edge) and adjusts its output accordingly. In server environments, it provides colored console output for better readability. +nexlog automatically detects the current environment (server, browser, or edge) and adjusts its output accordingly. In server environments, it provides colored console output for better readability. ## Development I use Bun as the all-in-one toolkit for this project. Here's how you can get started: -To install dependencies (although NextLogger has none, this is for development purposes): +To install dependencies (although nexlog has none, this is for development purposes): ```bash bun install @@ -133,41 +133,18 @@ This project is licensed under the MIT License. ## Support -If you find NextLogger helpful, consider [sponsoring me](https://github.com/sponsors/Arakiss). Your support helps me maintain and improve this project. +If you find nexlog helpful, consider [sponsoring me](https://github.com/sponsors/Arakiss). Your support helps me maintain and improve this project. ## FAQ -### Is NextLogger related to the 'next-logger' package? +### Does nexlog have any external dependencies? -No, NextLogger is not related to or affiliated with the 'next-logger' package. These are two independent projects with similar names but different implementations and purposes: +No, I designed nexlog to be completely self-contained with zero external dependencies. By leveraging Bun's comprehensive toolkit, I've been able to develop, test, and bundle nexlog without relying on any third-party packages. This means you don't need to worry about compatibility issues or security vulnerabilities from external dependencies. -- NextLogger (my project) is a lightweight, environment-aware logging library I specifically designed for Next.js 14.x and later versions. I created it to address logging needs in modern Next.js applications across server, browser, and edge environments. +### Does nexlog have any side effects? -- 'next-logger' is a separate project that patches Next.js's built-in logger to output logs as JSON, primarily focused on server-side logging. +No, I carefully designed nexlog to avoid any side effects. It doesn't modify global objects or interfere with other parts of your application. This makes it safe to use in any part of your Next.js project without worrying about unexpected behavior. -The similarity in names is coincidental. I developed NextLogger independently to solve specific logging challenges in recent Next.js versions, without prior knowledge of the 'next-logger' package. +### Why did you choose to build nexlog with Bun? -### Why did I create NextLogger when 'next-logger' exists? - -I created NextLogger to address specific logging needs in Next.js 14.x and later versions, particularly focusing on: - -1. Compatibility with server, browser, and edge environments in modern Next.js applications. -2. Lightweight implementation with zero external dependencies, leveraging Bun's all-in-one toolkit. -3. No side effects, ensuring it doesn't interfere with other parts of your application. -4. Easy integration without the need for custom server setups or extensive configuration. - -While 'next-logger' is a valuable tool for JSON logging in Next.js server environments, I aimed to provide a simple, universal logging solution across all Next.js runtime environments without introducing any external dependencies or side effects. - -### Does NextLogger have any external dependencies? - -No, I designed NextLogger to be completely self-contained with zero external dependencies. By leveraging Bun's comprehensive toolkit, I've been able to develop, test, and bundle NextLogger without relying on any third-party packages. This means you don't need to worry about compatibility issues or security vulnerabilities from external dependencies. - -### Does NextLogger have any side effects? - -No, I carefully designed NextLogger to avoid any side effects. It doesn't modify global objects or interfere with other parts of your application. This makes it safe to use in any part of your Next.js project without worrying about unexpected behavior. - -### Why did you choose to build NextLogger with Bun? - -I chose Bun for its all-in-one approach to JavaScript/TypeScript development. Bun's integrated runtime, bundler, test runner, and package manager allowed me to create NextLogger with zero external dependencies. This results in a faster, more lightweight, and more reliable logging solution for Next.js projects. - -I apologize for any confusion the similarity in names may cause and encourage users to carefully consider their specific logging needs when choosing a logging library. \ No newline at end of file +I chose Bun for its all-in-one approach to JavaScript/TypeScript development. Bun's integrated runtime, bundler, test runner, and package manager allowed me to create nexlog with zero external dependencies. This results in a faster, more lightweight, and more reliable logging solution for Next.js projects. \ No newline at end of file diff --git a/package.json b/package.json index 82a56e3..6a12d1f 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "nextlogger", + "name": "nexlog", "version": "1.0.0", "description": "A simple and effective logging library for Next.js, compatible with server, browser, and edge environments.", "main": "dist/index.js", @@ -20,12 +20,12 @@ }, "repository": { "type": "git", - "url": "https://github.com/Arakiss/nextlogger.git" + "url": "https://github.com/Arakiss/nexlog.git" }, "bugs": { - "url": "https://github.com/Arakiss/nextlogger/issues" + "url": "https://github.com/Arakiss/nexlog/issues" }, - "homepage": "https://github.com/Arakiss/nextlogger#readme", + "homepage": "https://github.com/Arakiss/nexlog#readme", "keywords": [ "logging", "next.js",