Skip to content

Instantly share code, notes, and snippets.

@kristjank
Created June 23, 2019 12:53
Show Gist options
  • Save kristjank/76a4b8b12efe8f31c3a8e0a2591ccff5 to your computer and use it in GitHub Desktop.
Save kristjank/76a4b8b12efe8f31c3a8e0a2591ccff5 to your computer and use it in GitHub Desktop.
import { Container } from "@arkecosystem/core-interfaces";
import { LogManager } from "@arkecosystem/core-logger";
import { defaults } from "./defaults";
import { PinoLogger } from "./driver";
export const plugin: Container.PluginDescriptor = {
pkg: require("../package.json"),
defaults,
alias: "logger",
extends: "@arkecosystem/core-logger",
async register(container: Container.IContainer, options) {
const logManager: LogManager = container.resolvePlugin("log-manager");
await logManager.makeDriver(new PinoLogger(options));
return logManager.driver();
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment