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

Make logging consistent #536

Open
4 tasks
nklincoln opened this issue Jul 31, 2019 · 14 comments · Fixed by #1348, #1363 or #1383
Open
4 tasks

Make logging consistent #536

nklincoln opened this issue Jul 31, 2019 · 14 comments · Fixed by #1348, #1363 or #1383
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@nklincoln
Copy link
Contributor

The current logging situation is a little bit ad-hoc. There is no enforced standard, and we would benefit greatly from a serviceability and usability point if we were to enforce logging standards across the Caliper code base.

We should be logging at debug level:

  • entry/exit from every method, including passed values

We should be logging at error level

  • every error thrown through the code

We should be logging at info level:

  • caliper lifecycle items
  • round information and basic statistics (we do this already)
@nklincoln nklincoln added enhancement New feature or request good first issue Good for newcomers labels Jul 31, 2019
@aklenik aklenik added this to the v0.2.0 milestone Sep 11, 2019
@aklenik aklenik modified the milestones: v0.2.0, v0.3.0 Oct 7, 2019
@0xamogh
Copy link

0xamogh commented Nov 28, 2019

Hey I would like to contribute to Caliper, starting with this issue.

@aklenik
Copy link
Contributor

aklenik commented Nov 29, 2019

@amogh-jrules Awesome! To get familiar with the logging aspects you can refer to this doc page: https://hyperledger.github.io/caliper/vNext/logging/
We're changing a LOT of the core code right now, so give us a few days to finish it, just to avoid a conflict hell :)
And drop by the next Caliper call, so we can have a discussion about the logging rules/guidelines:
https://github.com/hyperledger/caliper/wiki/Caliper-Calls

@0xamogh
Copy link

0xamogh commented Nov 29, 2019

Thanks, I'll do that!

@0xamogh
Copy link

0xamogh commented Dec 20, 2019

Hey, may I begin?

@aklenik
Copy link
Contributor

aklenik commented Jan 8, 2020

@amogh-jrules Sorry for the late reply. After PR #682 is merged, you can start working on the "master modules" in the following directory: https://github.com/hyperledger/caliper/tree/master/packages/caliper-core/lib/master

Until that time you can still inspect the different SUT adapters whether they require additional logging (probably yes). I'd recommend to start with the following adapters: Fabric, Ethereum, Sawtooth and FISCO-BCOS.
One thing to look out for: the invokeSmartContract and querySmartContract methods are considered hot paths, so they're performance critical, try not to stringify big objects during logging.

@0xamogh
Copy link

0xamogh commented Jan 8, 2020

Okay, thanks, if I have some queries where can I discuss them? Is there a community channel for this project?

@aklenik
Copy link
Contributor

aklenik commented Jan 9, 2020

@amogh-jrules Yes, see the Communication section of this page:
https://wiki.hyperledger.org/display/caliper

@0xt3j4s
Copy link
Contributor

0xt3j4s commented May 1, 2022

Is this issue resolved? If not can you explain a bit about the issue?

I am new to this ecosystem but would like to start with this issue if it's open. Please share some beginner-friendly resources if possible.

@aklenik
Copy link
Contributor

aklenik commented May 2, 2022

The issue is far from resolved, so every contribution is welcome! Check the following doc for guidelines on contributing: https://github.com/hyperledger/caliper/blob/main/CONTRIBUTING.md

@0xt3j4s
Copy link
Contributor

0xt3j4s commented May 5, 2022

Ok. Thank you!

Checked CONTRIBUTING.md,

@0xt3j4s
Copy link
Contributor

0xt3j4s commented May 11, 2022

From what I understood, I am supposed to check all the error logs for all the packages while following the above sub-tasks of the issue. So to solve this issue it may be required to create multiple PRs. As of now I am starting to work on a package say caliper-cli and then will submit it's PR. Likewise I'll check all the packages and then after merging all the PRs we can resolve this issue.

Please correct me if I am wrong.

@aklenik
Copy link
Contributor

aklenik commented May 11, 2022

@Tezas-6174 That sounds like a good workflow. Correcting error message per package sounds reasonable

@0xt3j4s
Copy link
Contributor

0xt3j4s commented May 12, 2022

Yes. So now, I will start by working on caliper-cli package following the above workflow.

Thank you.

davidkel pushed a commit that referenced this issue May 27, 2022
* Update error messages for 'bind'/'unbind' command

Signed-off-by: Tezas-6174 <jamdade.2@iitj.ac.in>

* Update error messages for 'launch worker' command

Signed-off-by: Tezas-6174 <jamdade.2@iitj.ac.in>

* Update error messages for 'launch manager' command

Signed-off-by: Tezas-6174 <jamdade.2@iitj.ac.in>

* Update error message for 'launch' command

Signed-off-by: Tezas-6174 <jamdade.2@iitj.ac.in>

* Remove unnecessary debug logs

Signed-off-by: Tezas-6174 <jamdade.2@iitj.ac.in>
@davidkel davidkel reopened this May 27, 2022
@davidkel davidkel reopened this Jun 21, 2022
@davidkel davidkel reopened this Jun 27, 2022
eravatee pushed a commit to eravatee/caliper that referenced this issue Oct 4, 2022
…fisco-bcos' package (hyperledger#1383)

* Update error messages for 'ethereum-connector'

Signed-off-by: Tezas-6174 <jamdade.2@iitj.ac.in>

* Fix and organize a few error messages

Signed-off-by: Tezas-6174 <jamdade.2@iitj.ac.in>

* minor changes in caliper-fisco-bcos

Signed-off-by: Tezas-6174 <jamdade.2@iitj.ac.in>

* resolve conflicts with caliper-ethereum package

Signed-off-by: Tezas-6174 <jamdade.2@iitj.ac.in>
Signed-off-by: eravatee <eraraje1997@gmail.com>
@anshikavashistha
Copy link

May I work on this issue ?
@aklenik @nklincoln

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment