hapijs / good

hapi process monitoring
Other
525 stars 160 forks source link

first examples #484

Closed jmjf closed 8 years ago

jmjf commented 8 years ago

Adds examples directory and examples for console, file, and http logging based on docs. Includes example of passing parameters to SafeJson (tested, works), log rotation (tested, works), and using white-out to censor data (untested).

arb commented 8 years ago

This is a great start. Can you also add a new or update an existing example to use the tag filtering logic of good-squeeze? Right now they all use "*" but that can be an array of tags.

jmjf commented 8 years ago

Thanks for the feedback. (Glad I flagged that as untested). I'll work on this tonight.

jmjf commented 8 years ago

I tried different approaches to indenting some of the complex args arrays and went with consistency and alignment over streamlining.

    args: [
        'http://prod.logs:3000',
        {
            wreck: {
                headers: { 'x-api-key': 12345 }
            }
        }
    ]

Alternatives I didn't choose.

    args: [ 'http://prod.logs:3000',
        { wreck: {
            headers: { 'x-api-key': 12345 }
        } // note, this bracket lines up with the wrong begin
    }]
    args: [ 'http://prod.logs:3000',
        { wreck: {
            headers: { 'x-api-key': 12345 }
            } // alternative doesn't look much better
    }]
    args: [ 'http://prod.logs:3000',
        { wreck: {
            headers: { 'x-api-key': 12345 }
        }} // stacking this feels wrong
    ]
arb commented 8 years ago

Thanks for contributing. Hopefully this will help people out.

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.