The design of mag is modular, but it is certainly overkill for most of simple cases. I would suggest not the streams but "middleware" concept. This is the way express.js works, Faraday or Faye from Ruby world.
The concept of middleware is it is some function that is called by module when it needs something. express.js is extremely simple - all I need is a single function for most of cases
The design of mag is modular, but it is certainly overkill for most of simple cases. I would suggest not the streams but "middleware" concept. This is the way express.js works, Faraday or Faye from Ruby world.
How I like logger to be:
The concept of middleware is it is some function that is called by module when it needs something. express.js is extremely simple - all I need is a single function for most of cases