Skip to content

flex-development/log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

πŸͺ’ log

github release npm codecov module type: esm license conventional commits typescript vitest yarn

Log messages in the terminal and browser

Contents

What is this?

This is a small, but useful, library for logging messages in the terminal and browser consoles.

Colorful messages can be logged in the terminal and browser consoles that support ANSI colors.

Why this package?

πŸ‘Œ Easy to use
πŸ”Œ Pluggable reporters
πŸ’» Consistent terminal experience
πŸ”– Tag support
🌐 Browser support

Install

This package is ESM only.

In Node.js with yarn:

yarn add @flex-development/log
See Git - Protocols | Yarn Β for details regarding installing from Git.

In Deno with esm.sh:

import { createLogger } from 'https://esm.sh/@flex-development/log'

In browsers with esm.sh:

<script type="module">
  import { logger } from 'https://esm.sh/@flex-development/log'
</script>

Use

TODO: use

API

This package exports the following identifiers:

The default export is logger.

πŸ‘‰ Note: See the source code for the most up-to-date documentation.

logger

(Logger) The default, pre-configured logger. Logs are written using the FancyReporter.

createLogger([options])

Create a new logger.

Parameters

Returns

(Logger) Logger object

logLevels

(Readonly<Record<LogType, LogLevel>>) Map where each key is a log type and each value is a log level.

Reporter

TODO: Reporter

BaseReporter

TODO: BaseReporter

FancyReporter

TODO: FancyReporter

Types

This package is fully typed with TypeScript.

Logger

TODO: Logger

InputLogObject

TODO: InputLogObject

InspectOptions

TODO: InspectOptions

LogFormatOptions

TODO: LogFormatOptions

LogFunction

TODO: LogFunction

LogFunctions

TODO: LogFunctions

LogLevel

TODO: LogLevel

LogLevelMap

TODO: LogLevelMap

LogLevelOption

TODO: LogLevelOption

LogLevelType

TODO: LogLevelType

LogObject

TODO: LogObject

LogType

TODO: LogType

LogTypeFunctions

TODO: LogTypeFunctions

LogTypeMap

TODO: LogTypeMap

LoggerOptions

TODO: LoggerOptions

ReportersOption

TODO: ReportersOption

WriteStream

TODO: WriteStream

Contribute

See CONTRIBUTING.md.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

About

πŸͺ’ a small logging library

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors 3

  •  
  •  
  •  

Languages