removing log file check

pull/15/head
alok 7 years ago
parent 870ce1241e
commit cc8a6d805c
  1. 10
      benchmark_main.go
  2. 11
      deploy_one_instance.sh

@ -85,16 +85,6 @@ func main() {
// Setup a logger to stdout and log file.
logFileName := fmt.Sprintf("./%v/%v.log", *logFolder, *port)
_, err := os.Stat(logFileName)
if err == nil {
fmt.Printf("file %s exists", logFileName)
os.Remove(logFileName)
fmt.Printf("removed file %s", logFileName)
} else if os.IsNotExist(err) {
fmt.Printf("file %s not exists", logFileName)
} else {
fmt.Printf("file %s stat error: %v", logFileName, err)
}
h := log.MultiHandler(
log.Must.FileHandler(logFileName, log.LogfmtFormat()),
log.StdoutHandler)

@ -22,8 +22,15 @@ echo ">>>>"
python aws-scripts/preprocess_peerlist.py
FILE='isTransaction.txt'
config=$1
log_folder=logs/
mkdir -p $log_folder
t=`date +"%Y%m%d-%H%M%S"`
log_folder="logs/log-$t"
if [ ! -d $log_folder ]
then
mkdir -p $log_folder
fi
if [ -f $FILE ]; then
go run ./aws-code/transaction_generator.go -config_file $config -log_folder $log_folder&
else

Loading…
Cancel
Save