Skip to content

Commit

Permalink
Support skipping compiled info
Browse files Browse the repository at this point in the history
Signed-off-by: Łukasz Gryglicki <[email protected]>
  • Loading branch information
lukaszgryglicki committed Apr 24, 2024
1 parent ef9fd99 commit b94be36
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions log.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,19 @@ func newLogContext() *logContext {
progSplit := strings.Split(os.Args[0], "/")
prog := progSplit[len(progSplit)-1]
now := time.Now()
info := fmt.Sprintf("Compiled %s, commit: %s on %s using %s", BuildStamp, GitHash, HostName, GoVersion)
fmt.Printf("%s\n", info)
_, _ = ExecSQL(
con,
&ctx,
"insert into gha_logs(prog, proj, run_dt, msg) "+NValues(4),
prog,
ctx.Project,
now,
info,
)
if ctx.Debug >= 0 {
info := fmt.Sprintf("Compiled %s, commit: %s on %s using %s", BuildStamp, GitHash, HostName, GoVersion)
fmt.Printf("%s\n", info)
_, _ = ExecSQL(
con,
&ctx,
"insert into gha_logs(prog, proj, run_dt, msg) "+NValues(4),
prog,
ctx.Project,
now,
info,
)
}
defer func() {
logInitMtx.Lock()
logInitialized = true
Expand Down

0 comments on commit b94be36

Please sign in to comment.