Feature Request: Add timestamp in oci.log file
AD2011 opened this issue · 2 comments
AD2011 commented
As the title suggests, please add the option to log timestamp in the oci.log file
sceptre0 commented
I've just set the script up, and to achieve timestamp in the log I've created a shell script called timestamp.sh
#!/bin/bash
while read x; do
echo -n date +%d/%m/%Y\ %H:%M:%S
;
echo -n " ";
echo $x;
done
And then edited my crontab to read as follows:
5 * * * * /usr/bin/php /opt/oci-arm-host-capacity/index.php 2>&1 | /opt/oci-arm-host-capacity/timestamp.sh >> /opt/oci-arm-host-capacity/oci.log
Crude but effective!