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

How to log additional fields as standard? #43

Open
julioomoura opened this issue Aug 9, 2019 · 0 comments
Open

How to log additional fields as standard? #43

julioomoura opened this issue Aug 9, 2019 · 0 comments

Comments

@julioomoura
Copy link

julioomoura commented Aug 9, 2019

I know we can log additional fields, using a parameter in the functions:
function (short_message, full_message, additionalFields, timestamp)

But I'd like to set an additional field at the initial configuration:

var logger = new graylog2.graylog({
    servers: [
        { 'host': '127.0.0.1', port: 12201 },
        { 'host': '127.0.0.2', port: 12201 }
    ],
    hostname: 'server.name', // the name of this host
                             // (optional, default: os.hostname())
    facility: 'Node.js',     // the facility for these log messages
                             // (optional, default: "Node.js")
    bufferSize: 1350         // max UDP packet size, should never exceed the
                             // MTU of your system (optional, default: 1400)
   ///////////////additional field
   "_additionalField": "content"
}); 

Is it possible?

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

No branches or pull requests

1 participant