-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
econfig working well on ra25 but some issues remain..
- Loading branch information
Showing
5 changed files
with
36 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (c) 2023, The Emergent Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package econfig | ||
|
||
import ( | ||
"github.com/emer/emergent/elog" | ||
"github.com/emer/emergent/etime" | ||
) | ||
|
||
// LogFileName returns a standard log file name as netName_runName_logName.tsv | ||
func LogFileName(logName, netName, runName string) string { | ||
return netName + "_" + runName + "_" + logName + ".tsv" | ||
} | ||
|
||
// SetLogFile sets the log file for given mode and time, | ||
// using given logName (extension), netName and runName, | ||
// if the Config flag is set. | ||
func SetLogFile(logs *elog.Logs, configOn bool, mode etime.Modes, time etime.Times, logName, netName, runName string) { | ||
if !configOn { | ||
return | ||
} | ||
fnm := LogFileName(logName, netName, runName) | ||
logs.SetLogFile(mode, time, fnm) | ||
} |