#!/bin/sh

# @file run_logged
#
# Copyright (C) Metaswitch Networks 2013
# If license terms are provided to you in a COPYING file in the root directory
# of the source code repository by which you are accessing this code, then
# the license outlined in that COPYING file applies to your use.
# Otherwise no rights are granted except for those provided to you by
# Metaswitch Networks in a separate written agreement.

TAG=monit
( echo "CMD $@"
  $@
  RETCODE=$?
  [ $RETCODE -eq 0 ] || echo "Command returned error $RETCODE"
) 2>&1 | logger -t "$TAG"
