message: setup sendToAmazeeioLogs only after initSendToAmazeeioLogs is called
diff: const amqp = require('amqp-connection-manager')
  const { logger } = require('./local-logging');
  -exports.initSendToAmazeeioLogs = initSendToAmazeeioLogs;
  -exports.sendToAmazeeioLogs = sendToAmazeeioLogs;
  import type { ChannelWrapper } from './types';
  const rabbitmqHost = process.env.RABBITMQ_HOST || "rabbitmq"
  const rabbitmqUsername = process.env.RABBITMQ_USERNAME || "guest"
  const rabbitmqPassword = process.env.RABBITMQ_PASSWORD || "guest"
  -let channelWrapperLogs: ChannelWrapper
  +exports.initSendToAmazeeioLogs = initSendToAmazeeioLogs;
  +let sendToAmazeeioLogs = exports.sendToAmazeeioLogs = sendToAmazeeioLogs => {};
  function initSendToAmazeeioLogs() {
  const connection = amqp.connect([`amqp://${rabbitmqUsername}:${rabbitmqPassword}@${rabbitmqHost}`], { json: true });
  @@ -27,9 +26,8 @@ function initSendToAmazeeioLogs() {
  ]);
  }
  });
  -}
  -async function sendToAmazeeioLogs(severity: string, sitegroup: string, uuid: string, event: string, meta: object, message: string): Promise<void> {
  + exports.sendToAmazeeioLogs = sendToAmazeeioLogs = async (severity: string, sitegroup: string, uuid: string, event: string, meta: object, message: string): Promise<void> => {
  const payload = {severity, sitegroup, uuid, event, meta, message}
  @@ -48,3 +46,6 @@ async function sendToAmazeeioLogs(severity: string, sitegroup: string, uuid: str
  logger.error(`amazeeio-logs: Error send to rabbitmq amazeeio-logs exchange, error: ${error}`);
  }
  }
  +
  +}
  +
  