const parentApp = (module) => ({
  log: async (msg) => {
    try {
      const {
        index,
        host,
        environment,
        level,
        resourceId,
        resourceType,
        appVersion,
        team,
        location,
        correlationId,
        instanceId,
        customerId,
        userId,
        loanId,
        context,
        ...rest
      } = msg;
      delete rest["@timestamp"];
      return await module.log(rest, level);
    } catch (err) {
      console.error(err);
      return false;
    }
  }
});
export {
  parentApp
};
