Skip to content

Logging as NPM module #1

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

Merged
merged 6 commits into from
Dec 9, 2023
Merged

Conversation

gitcoindev
Copy link
Collaborator

@gitcoindev gitcoindev requested a review from 0x4007 December 8, 2023 12:41
@gitcoindev gitcoindev marked this pull request as draft December 8, 2023 12:41
@gitcoindev
Copy link
Collaborator Author

Hi @pavlovcik the dependencies looks fine, NPM package builds. I need still to test and publish from my fork though and see if it can be correctly imported and built, therefore I set this pull request still as a draft.

@gitcoindev gitcoindev marked this pull request as ready for review December 8, 2023 14:17
@gitcoindev
Copy link
Collaborator Author

@pavlovcik pull request ready for the review.

Package correctly exported:

npm notice 
npm notice 📦  ubiquibot-logger@0.3.0
npm notice === Tarball Contents === 
npm notice 49B    README.md              
npm notice 1.9kB  dist/logs.d.ts         
npm notice 12.5kB dist/logs.js           
npm notice 27.2kB dist/logs.js.map       
npm notice 604B   dist/pretty-logs.d.ts  
npm notice 4.2kB  dist/pretty-logs.js    
npm notice 9.3kB  dist/pretty-logs.js.map
npm notice 2.2kB  package.json           
npm notice === Tarball Details === 
npm notice name:          ubiquibot-logger                        
npm notice version:       0.3.0                                   
npm notice filename:      ubiquibot-logger-0.3.0.tgz              
npm notice package size:  11.0 kB                                 
npm notice unpacked size: 57.8 kB                                 
npm notice shasum:        ae296958daae3169bfde2866379216621c7c41f5
npm notice integrity:     sha512-F3BExAEPfQrHK[...]oECTw1tELcn0Q==
npm notice total files:   8                                       
npm notice 
npm notice Publishing to https://registry.npmjs.org/ with tag latest and default access
+ ubiquibot-logger@0.3.0

QA build with import from 0x4007/ubiquibot#60 builds without errors:

{refactor-general-with-npm-logging} ~/ubiquibot$ yarn build
yarn run v1.22.19
$ tsc
Done in 5.45s.

Copy link
Member

@0x4007 0x4007 left a comment

Choose a reason for hiding this comment

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

Great work! I'm unsure how we can decouple the GitHub comments from this but the main reusable portion is 1. Supabase logging and 2. The nice colored and formatted outputs.

My vision is to be able to reuse these for all of our projects, perhaps bundling with @ubiquity/ts-template

Logging fatal errors I expect will expedite triage for any fatal issues of our products.

It will be nifty to integrate that with a telegram bot to post in a triage group chat for go live. Perhaps even automatically creating and funding issues on GitHub as well.

@0x4007 0x4007 merged commit 4ef4a59 into ubiquity-os:development Dec 9, 2023
@0x4007 0x4007 mentioned this pull request Dec 9, 2023
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.

Refactor logging into a separate NPM module
2 participants