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

Implement Logging in wallets.js #205

Open
BrosG opened this issue May 24, 2023 · 0 comments
Open

Implement Logging in wallets.js #205

BrosG opened this issue May 24, 2023 · 0 comments
Assignees
Labels

Comments

@BrosG
Copy link
Contributor

BrosG commented May 24, 2023

In the file wallets.js, there doesn't seem to be any logging mechanism. Logging is essential for debugging and tracking user activities, especially when it comes to handling errors and exceptions.
Suggestion: Implement a logging mechanism using a logging library like Winston or Bunyan. It's also recommended to implement a log management solution to efficiently store, manage, and analyze logs.

`const winston = require('winston');

const logger = winston.createLogger({
level: 'info',
format: winston.format.json(),
defaultMeta: { service: 'user-service' },
transports: [
new winston.transports.File({ filename: 'error.log', level: 'error' }),
new winston.transports.File({ filename: 'combined.log' })
]
});

logger.error('Error message');
logger.warn('Warning message');
logger.info('Info message');
logger.verbose('Verbose message');
logger.debug('Debug message');
logger.silly('Silly message');
`

@BrosG BrosG added the logging label May 24, 2023
@BrosG BrosG self-assigned this May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant