Skip to content

feat: shared logger library - #3451

Merged
dnechay merged 7 commits into
developfrom
dnechay/3387
Jul 10, 2025
Merged

feat: shared logger library#3451
dnechay merged 7 commits into
developfrom
dnechay/3387

Conversation

@dnechay

@dnechay dnechay commented Jul 7, 2025

Copy link
Copy Markdown
Collaborator

Issue tracking

Closes #3387

Context behind the change

Created a custom logger package that we can install using yarn workspaces and use across all apps. Also it can be used in any other HUMAN Protocol service after we publish it to npm.

How has this been tested?

  • install logger in RepO and run yarn start locally to verify log messages
  • run RepO in docker, check logs from docker container
  • yarn pack to make sure all necessary files included into distro

Release plan

  1. Merge
  2. Publish to npm later
  3. Use anywhere (aka migrate other apps to it)

Potential risks; What to monitor; Rollback plan

Should be none

@vercel

vercel Bot commented Jul 7, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
human-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 8, 2025 10:58am
human-dashboard-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 8, 2025 10:58am
staking-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 8, 2025 10:58am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
faucet-frontend ⬜️ Ignored (Inspect) Visit Preview Jul 8, 2025 10:58am
faucet-server ⬜️ Ignored (Inspect) Visit Preview Jul 8, 2025 10:58am

Comment thread .github/workflows/cd-logger.yaml Fixed

@portuu3 portuu3 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@dnechay What do you think about moving logger folder from rep oracle into common?

@Dzeranov

Dzeranov commented Jul 9, 2025

Copy link
Copy Markdown
Contributor

@portuu3 @dnechay
What do you think about moving this logger package into a different repo?
I mean, we have plans to publish this package and use it across the monorepo from npm. Might be worth discussing.

@dnechay

dnechay commented Jul 10, 2025

Copy link
Copy Markdown
Collaborator Author

@portuu3

What do you think about moving logger folder from rep oracle into common?

I wouldn't, because IMU logger belongs to some sort of infrastructure level, where we might have database, cache, queue and other similar things. Right now we have only database and logger, so it's fine to keep them directly in src, but we can have src/infrastructure for that

@Dzeranov

What do you think about moving this logger package into a different repo?

TBH, I don't fully understand the purpose and boundaries of this monorepo (what is the initial idea to have it) and perceive it like "catch-all HUMAN Protocol". We have sdk package here, which is also published to npm and can be used elsewhere, so I don't see benefits of moving the logger out of here.

At the same time, we can discuss the boundaries and purpose of monorepo, so after that it becomes clear where to place things. My vision is next:

  • we have humanprotocol org
  • we have one monorepo to work with contracts and blockchain stuff, which includes:
    • current core workspace
    • all the sdk stuff for any language
    • subgraph staff
    • these should be published to npm, respect semver contracts and be used only as package installation
  • we have one monorepo with oracles and other necessary apps that protocol runs itself

The latter will definitely need some packages/shared or packages/libs that will hold some shared code and we won't even need to publish it to npm, because only our oracles will use that. If we think that something might be useful outside of this repo (e.g. logger), then I would have one repo per thing (or we can have some humanprotocol/misc monorepo with all things like this, but it's overhead IMO)

@dnechay
dnechay requested a review from portuu3 July 10, 2025 13:14

@Dzeranov Dzeranov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lets merge it for now, we might want to revisit in case we change monorepo setup.

@dnechay dnechay changed the title feat: shared logger libarary feat: shared logger library Jul 10, 2025
@dnechay
dnechay merged commit fe61ffa into develop Jul 10, 2025
13 checks passed
@dnechay
dnechay deleted the dnechay/3387 branch July 10, 2025 15:18
@github-project-automation github-project-automation Bot moved this from In Review to Done in Core-tech - 2025 Jul 10, 2025
@dnechay dnechay mentioned this pull request Jul 10, 2025
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Create a custom logging package

4 participants