diff --git a/targets/PROJECTS/SPECTRA/utils.bash b/targets/PROJECTS/SPECTRA/utils.bash
index 724d9f5089bc5192ca52773479304a2ea0925d45..5d54b98c9425619392b7ebfd651300f21468d46d 100755
--- a/targets/PROJECTS/SPECTRA/utils.bash
+++ b/targets/PROJECTS/SPECTRA/utils.bash
@@ -316,6 +316,17 @@ check_for_root_rights() {
     fi
 }
 
+rotate_log_file () {
+    if [ -f $1 ]; then
+        TIMESTAMP=`date +%Y-%m-%d.%Hh_%Mm_%Ss`
+        NEWLOGFILE=$1.$TIMESTAMP
+        mv $1 $NEWLOGFILE
+        cat /dev/null > $1
+        sync
+        nohup gzip -f -9 $NEWLOGFILE &
+    fi
+}
+
 ###########################################################
 declare -x OPENAIR_DIR=""
 declare -x OPENAIR_HOME=""