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

feat: add logging on init #23

Merged
merged 4 commits into from
Sep 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/tag-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ jobs:
changes=$(npx conventional-changelog-cli -r 1 | tail -n +2)
git add CHANGELOG.md
git commit -m "chore: Updating changelog for $version"
git tag $version -m " $changes"
git tag $version -m "Release $version $changes"
git push origin $version
git push origin main
gh release create $version --verify-tag --title "" --notes "$changes"
gh release create $version --verify-tag --title "" --notes "Release $version $changes"
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
npm publish --access public
fi
Expand Down
9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ class Logger {
Object.keys(customLevels.levels).forEach((level) => {
this[level] = (...args) => this.logger[level](...args);
});

console.log('\n');
console.log(`Application name: ${projectName}`);
console.log(`Application version: ${packageVersion}`);
console.log(`Log level set to ${logLevel}`);
console.log(
`Available log levels: ${Object.keys(customLevels.levels).join(", ")}`
);
console.log('\n');
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chia-carbon/core-registry-logger",
"version": "1.0.8",
"version": "1.0.9",
"description": "Custom logger for core registry projects",
"main": "index.js",
"scripts": {
Expand Down