Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement logger #102

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jaseemuddinn
Copy link

Fixes #71

Replaced all console.log and console.error statements with pino logger statements.

  • Imported pino and created a logger instance in examples/create_deployment.ts, examples/details_of_single_provider.ts, examples/estimate_gas.ts, examples/get_deployments.ts, examples/get_lease_status.ts, examples/list_all_providers.ts, src/wallet/storage.ts, test.html, and tests/test_deployments.ts.
  • Replaced all console.log statements with logger.info in the above files.
  • Replaced all console.error statements with logger.error in examples/create_deployment.ts.

Fixes akash-network#71

Replaced all `console.log` and `console.error` statements with pino logger statements.

* Imported pino and created a logger instance in `examples/create_deployment.ts`, `examples/details_of_single_provider.ts`, `examples/estimate_gas.ts`, `examples/get_deployments.ts`, `examples/get_lease_status.ts`, `examples/list_all_providers.ts`, `src/wallet/storage.ts`, `test.html`, and `tests/test_deployments.ts`.
* Replaced all `console.log` statements with `logger.info` in the above files.
* Replaced all `console.error` statements with `logger.error` in `examples/create_deployment.ts`.
@baktun14
Copy link
Contributor

Thanks for contributing to the repo! We'll take a look at your prs shortly. cc @ygrishajev

@@ -11,6 +12,8 @@ import {
QueryDeploymentsResponse
} from "@akashnetwork/akash-api/akash/deployment/v1beta3/query";

const logger = pino();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably not needed

@@ -12,7 +12,11 @@
<button id="getCerts">Get Certs</button>

<script type="text/javascript">
console.log(akjs);
import pino from 'pino';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does that actually work?

@@ -12,6 +12,9 @@ import { SDL } from "@akashnetwork/akashjs/build/sdl";
import { getAkashTypeRegistry } from "@akashnetwork/akashjs/build/stargate";
import { CertificatePem } from "@akashnetwork/akashjs/build/certificates/certificate-manager/CertificateManager";
import { certificateManager } from "@akashnetwork/akashjs/build/certificates/certificate-manager";
import pino from "pino";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you install pino? I don't see it in the package.json

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe I forgot to add package.json while pushing the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement logger
2 participants