Skip to content

Commit

Permalink
Replaced winston logger with tslog
Browse files Browse the repository at this point in the history
  • Loading branch information
chamorin committed Jun 2, 2023
1 parent a41b3d6 commit c84b18f
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 256 deletions.
6 changes: 3 additions & 3 deletions example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const pkg = {
version: '0.1.0',
description: 'Substreams data to RabbitMQ',
}
logger.defaultMeta = { service: pkg.name };
logger.settings.name = pkg.name;

const program = cli.program(pkg);
const command = cli.run(program, pkg);
Expand All @@ -28,12 +28,12 @@ async function action(manifest: string, moduleName: string, options: ActionOptio
// Download Substreams (or read from local file system)
const spkg = await download(manifest);
const hash = createHash(spkg);
logger.info("download", {manifest, hash});
logger.info("download", { manifest, hash });

// Handle custom Sink Options
const { address, port, username, password } = options;
const rabbitmq = `amqp://${username}:${password}@${address}:${port}`;
logger.info("connect", {rabbitmq});
logger.info("connect", { rabbitmq });

// Run Substreams
const substreams = run(spkg, moduleName, options);
Expand Down
Loading

0 comments on commit c84b18f

Please sign in to comment.