Closed cjthompson closed 2 years ago
Working on a major refactor/rewrite of all the code right now, but I feel like we could use tags for this rather than adding a transport specific config item.. Just a quick check for if tags is an object in the logstash transport should be plenty, no?
Perhaps, if you define tags in the configuration so that certain tags will always be outputted.
As is, you can do
var logger = require('bucker').createLogger(/* opts */).tags(/* tags */);
and you'll get the same effect
I am working on the rewrite though, so if you have other ideas, now is a good time to bring them up
This PR gives the
logstash
writer the ability to write a static list of key-value pairs to each log entry. This allows for custom configuration file to be written on different servers/environments that will contain static data to log, such as the server name, ip address, or other important server-specific information.One way to leverage this change is to use the npm
config
module with a default bucker configuration section and override that using a separate config per environment and server.