Skip to content

Implement Logging in wallets.js #205

Description

@BrosG

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');
`

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions