@targoninc/ts-logging
TypeScript icon, indicating that this package has built-in type declarations

0.0.11 • Public • Published

How to use

Install

Package manager Command
bun bun i @targoninc/ts-logging
pnpm pnpm i @targoninc/ts-logging
npm npm i @targoninc/ts-logging

Log

import {CLI, configureDBLogging, LoggingDb} from "@targoninc/ts-logging";

// You can log to database
configureDBLogging(db as LoggingDb);

// .debug() by default doesn't log to DB, so you'll have to specifically enable it
CLI.debug(`This is a test log`, {
    logToDb: true
});

// You can get a full stack trace in addition to logging objects
CLI.trace({
    userId: -1
});

Package Sidebar

Install

npm i @targoninc/ts-logging

Weekly Downloads

25

Version

0.0.11

License

none

Unpacked Size

13 kB

Total Files

9

Last publish

Collaborators

  • loudar
  • alexanderfritsch