src/index.js
function createPayload(name, level, data) {
  return {
    date: getDate(),
    level: level,
    name: name,
    data: data
  };
}
function createPayload(name, level, data) {
  return {
    date: getDate(),
    level: level,
    name: name,
    data: data
  };
}
Function that create a JSON structure to be logged

@param {string} name - Name of the logger
@param {int} level - Logging level. E.g. log, warn, error
@param {object} data - application data to be logged

@returns {{date: Date, level: int, name: string, data: object}}
Meta data to be logged