Read-only mirror of https://github.com/DCC-BS/logger.bs.js — Basel-Stadt. Issues & pull requests at the source.
  • TypeScript 99.2%
  • Vue 0.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tobias Bollinger 1976ce048b
Add deprecation notice and link to Nuxt-Layers
Added deprecation notice for the project.
2026-01-15 10:44:36 +01:00
.github/workflows chore(deps): update dependency node to v22 2025-07-25 10:58:40 +00:00
.vscode refactor: standardize formatting and improve code readability in logger interfaces and implementations 2025-04-10 16:20:04 +02:00
playground fix(deps): update dependency nuxt to v4 2025-07-28 11:18:32 +00:00
src refactor: improve code formatting and organization in logger files 2025-05-12 14:48:49 +02:00
test refactor: standardize formatting and improve code readability in logger interfaces and implementations 2025-04-10 16:20:04 +02:00
.editorconfig inital commit 2025-03-17 10:35:33 +01:00
.gitignore inital commit 2025-03-17 10:35:33 +01:00
.npmignore inital commit 2025-03-17 10:35:33 +01:00
.npmrc inital commit 2025-03-17 10:35:33 +01:00
biome.json chore(biome): update biome configuration for improved linting and file inclusion 2025-07-28 13:18:21 +02:00
bun.lock chore(deps): update dependency @biomejs/biome to v2.1.3 2025-07-30 01:00:50 +00:00
CHANGELOG.md chore(release): v1.2.0 2025-05-09 17:35:58 +02:00
codecov.yml inital commit 2025-03-17 10:35:33 +01:00
LICENSE inital commit 2025-03-17 10:35:33 +01:00
package.json chore(deps): update dependency @biomejs/biome to v2.1.3 2025-07-30 01:00:50 +00:00
README.md Add deprecation notice and link to Nuxt-Layers 2026-01-15 10:44:36 +01:00
renovate.json Update renovate.json with new configurations 2025-11-27 08:48:54 +01:00
tsconfig.json refactor: standardize formatting and improve code readability in logger interfaces and implementations 2025-04-10 16:20:04 +02:00
vitest.config.ts refactor: standardize formatting and improve code readability in logger interfaces and implementations 2025-04-10 16:20:04 +02:00

logger.bs.js

Important

This project is deprecated use Nuxt-Layers instead.

GitHub package.json version GitHub Actions Workflow Status codecov

Default logger use for all nuxt apps.

Quick Setup

To install the module create a .npmrc next to your package.json file:

//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
@dcc-bs:registry=https://npm.pkg.github.com

Create a github personal access token (classic) with read:packages permissions and add it to your .env file:

GITHUB_TOKEN='YOUR_TOKEN'

Install the module to your Nuxt application with:

bun x nuxi module add @dcc-bs/logger.bs.js

That's it! You can now use logger.bs.js in your Nuxt app

Usage

You can get the logger over the composable useLogger:

const logger = useLogger();

logger.infor('log a info message');
logger.warn('log a warn message');
logger.error('log a error');

On the api side you can get the logger with the util function getEventLogger:

export default defineEventHandler(async (event) => {
    const logger = getEventLogger(event);
    logger.info('log messages');
});

when the module is installed all failed request will be logged as an error.

Release a new Version

Commit your changes and then:

bun release