Skip to content

Commit

Permalink
build($Bash): support log to files
Browse files Browse the repository at this point in the history
support log to files

BREAKING CHANGE: support log to files
  • Loading branch information
johnnymillergh committed Dec 21, 2021
1 parent c8f6817 commit 8e876cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions auto-run-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ readonly runServices=(
api-gateway
spring-boot-admin
oss-center
auth-center
)
readonly skipGitPull=true
readonly skipBuild=false
Expand Down Expand Up @@ -92,7 +93,7 @@ function logError() {
}

#######################################
# Run JAR.
# Run JAR with nohup (Background), and log to file.
# Arguments:
# $1 The service name (same as directory) to run.
# e.q. The name of service `service-registry` is `service-registry`,
Expand All @@ -110,7 +111,7 @@ function runJar() {
# Run Java program in background but then can't control terminal afterwards
runJarCommand="java $javaParameter -jar $jarFileRelativePath"
# shellcheck disable=SC2086
nohup $runJarCommand &
nohup $runJarCommand > "$1.log" &
logInfo "[RUN] Executed COMMAND: $runJarCommand"
}

Expand Down

0 comments on commit 8e876cf

Please sign in to comment.