-
Notifications
You must be signed in to change notification settings - Fork 14
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
base: main
Are you sure you want to change the base?
Implement logger #102
Conversation
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`.
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(); |
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Fixes #71
Replaced all
console.log
andconsole.error
statements with pino logger statements.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
, andtests/test_deployments.ts
.console.log
statements withlogger.info
in the above files.console.error
statements withlogger.error
inexamples/create_deployment.ts
.