Skip to content

Commit

Permalink
Print logs to stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericlemoine committed Jan 30, 2017
1 parent f0f66be commit 1e18267
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cmd/support.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ The supports implemented are :
if err != nil {
io.ExitWithMessage(err)
}
if supportLogFile != "stdout" {
if supportLogFile != "stderr" {
supportLog, err = os.Create(supportLogFile)
} else {
supportLog = os.Stdout
supportLog = os.Stderr
}
if err != nil {
io.ExitWithMessage(err)
Expand All @@ -57,5 +57,5 @@ func init() {
supportCmd.PersistentFlags().StringVarP(&supportIntree, "reftree", "i", "stdin", "Reference tree input file")
supportCmd.PersistentFlags().StringVarP(&supportBoottrees, "bootstrap", "b", "none", "Bootstrap trees input file")
supportCmd.PersistentFlags().StringVarP(&supportOutFile, "out", "o", "stdout", "Output tree file, with supports")
supportCmd.PersistentFlags().StringVarP(&supportLogFile, "log-file", "l", "stdout", "Output log file")
supportCmd.PersistentFlags().StringVarP(&supportLogFile, "log-file", "l", "stderr", "Output log file")
}
2 changes: 1 addition & 1 deletion support/mast.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func (supporter *MastSupporter) ComputeValue(refTree *tree.Tree, empiricalTrees
// bootstrap trees > 0.8
nb_branches_close := 0
for treeV := range bootTreeChannel {
fmt.Println(fmt.Sprintf("CPU : %d - Bootstrap tree %d", cpu, treeV.Id))
fmt.Fprintf(os.Stderr, "CPU : %d - Bootstrap tree %d\n", cpu, treeV.Id)
bootEdges := treeV.Tree.Edges()

for i, _ := range edges {
Expand Down

0 comments on commit 1e18267

Please sign in to comment.