hapijs / good

hapi process monitoring
Other
525 stars 160 forks source link

Good 7.0.0 Release Notes #467

Closed arb closed 8 years ago

arb commented 8 years ago

:warning: This doc may change slightly as this is for a release candidate. Important changes will be called out in the document comments. This issue will remain open until version 7 has been published. :warning:

Summary

The goal of the 7.0.0 release was to change the reporter interface to use standard node streams and pipes. No more custom interface. This allows developers more control of their needs and broadens the reporter options to any transform or write stream in the node ecosystem.

None of the good-* reporters have their "latest" tags updated (yet). For example, to install the latest version of good-console, you would need to do npm install good-console@6.0.0. Just npm install good-console will give you the 5.x.x version which is not compatible with the good release candidate.

var options = {
    reporters: [{
        reporter: require('good-file'),
        events: {
            request: '*'
        },
        config: './__log.log'
    }]
};

needs to be updated to

const options = {
    reporters: {
        file: [{
            module: 'good-squeeze',
            name: 'Squeeze',
            args: [{ request: '*' }]
        }, {
            module: 'good-squeeze',
            name: 'SafeJson'
        }, {
            module: 'good-file',
            args: ['./__log.log']
        }]
    }
};
gr2m commented 8 years ago

@arb I’m sorry to bother, I tried to migrate our Good usage at Hoodie (https://github.com/hoodiehq/hoodie/issues/478) but had no luck. We use it at a single place, for our logging: https://github.com/hoodiehq/hoodie/blob/master/server/plugins/logger.js

Would you mind giving us a few pointers on how to migrate to v7? I’d really appreciate it

arb commented 8 years ago

I'm not sure what you're asking? What is or is not working? What have you tried? Also, can you open a new issue? This is more just for book keeping reasons and not to add questions about new versions.

lock[bot] commented 4 years ago

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.