2.1.0 • Published 12 months ago

zerilog v2.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months ago

Zerilog - Serilog for Typescript

Creating a simple logger

import { LoggerConfiguration, ConsoleZink } from 'zerilog';

const Logger = new LoggerConfiguration()
    .WriteTo(new ConsoleZink())
    .CreateLogger();

Creating a simple logger that is accessable from anywhere

import Zerilog, { LoggerConfiguration, ConsoleZink } from 'zerilog';

Zerilog.Logger = new LoggerConfiguration()
    .WriteTo(new ConsoleZink())
    .CreateLogger();

Using the logger

import Zerilog from 'zerilog';

Zerilog.Logger
    .Information("Hello World!");

Creating a custom 'zink' for the logger

import { ZerilogZink, ZerilogContext } from 'zerilog';

class CustomZink extends ZerilogZink {
    SendLog(logContext: ZerilogContext): void {}
}
2.0.3

12 months ago

2.0.2

12 months ago

2.0.5

12 months ago

2.0.4

12 months ago

2.1.0

12 months ago

2.0.1

12 months ago

2.0.0

12 months ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago