This module uses winston for logging with optional label support. Please use labels where possible. The following options are shown below:
// Using the default logger without labels
// + short
// + easy
// - makes logs ambiguous
// - makes details in the logging platform vague (when that comes about)
import { __ } from "./logging/Log";
__.info('Hello');
// Using the long format with label
// + descriptive
// + adds labels
// - long
import makeLogger from "./logging/Log";
const __ = makeLogger('hi');
__.info('hi');
// Using the shorthand function with labels
// + descriptive
// + adds labels
// - skill kinda long
import { _ml } from "./logging/Log";
const ml = _ml('label');
ml.info('hey');
- Could abstract out the RabbitNetworkHandler and make it so you attach validators instead of it being opinionated about messages
- Handle an automatic timeout on requests, so we don't keep caching them if the handlers don't function properly