effect-log v0.31.2
effect-log
Logging batteris for effect-ts.
Pretty logger
Use PrettyLogger.make
to create the pretty logger or PrettyLogger.layer
to
obtain a layer replacing the default logger. Optionally, these functions
accept an options object configuring what information gets
to the output.
import { Effect, pipe } from "effect";
import { PrettyLog } from "effect-log";
import { exampleEffect } from "./example-logging-effect";
// These are the defaults. You can omit the argument
// completely if you're okay with the defaults.
const logger = PrettyLog.layer({
showFiberId: true,
showTime: true,
showSpans: true,
enableColors: true,
});
pipe(exampleEffect, Effect.provide(logger), Effect.runSync);
JSON logger
Use JsonLogger.make
to create the JSON logger or JsonLogger.layer
to
obtain a layer replacing the default loggger. Optionally, these functions
accept an options object configuring what information gets
to the output.
import { Effect, pipe } from "effect";
import { JsonLogger } from "effect-log";
import { exampleEffect } from "./example-logging-effect";
// These are the defaults. You can omit the argument
// completely if you're okay with the defaults.
const logger = JsonLogger.layer({
showFiberId: true,
showTime: true,
showSpans: true,
messageField: "message",
});
pipe(exampleEffect, Effect.provide(logger), Effect.runSync);
8 days ago
21 days ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
5 months ago
5 months ago
5 months ago
5 months ago
6 months ago
7 months ago
6 months ago
6 months ago
6 months ago
7 months ago
6 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
8 months ago
8 months ago
8 months ago
9 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
8 months ago
8 months ago
8 months ago
8 months ago
11 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
12 months ago
11 months ago
12 months ago
12 months ago
12 months ago
1 year ago
12 months ago
12 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago