flatiron/winston — pull request #208 by clintandrewhall (2012-12-20 17:08:49+00:00)
Title: Add labels for multiple loggers who share the same transport.

I have a library where each sub-module creates its own id'd logger... this allows a consumer to configure logging levels and transports for each sub-module individually just from config.

What I'd like to add is the ability to label each message from a logger so the output is something like:

12:12:12 [submodule one] debug: awesome logged message
12:12:12 [submodule two] info: awesome logged message

by configuring the logger as follows:

winston.loggers.add('category1', {
console: {
level: 'silly',
colorize: 'true',
label: 'category one'
}
);

This pull request enables the ability to label each logger's output.