去掉stdout 日志颜色,以便executor只获取到日志正文
This commit is contained in:
@@ -3,7 +3,7 @@ package cmd
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/k0kubun/pp/v3"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
"starwiz.cn/sjy01/preprocessing/extract"
|
||||
)
|
||||
@@ -26,11 +26,27 @@ var extractCmd = &cobra.Command{
|
||||
panic(err)
|
||||
}
|
||||
|
||||
pp.Println(params)
|
||||
log.Println("input data:", params.InputData)
|
||||
log.Println("output path:", params.OutputPath)
|
||||
log.Println("temp path:", params.TempPath)
|
||||
log.Println("data id:", params.DataId)
|
||||
log.Println("satellite:", params.Satellite)
|
||||
|
||||
e := extract.NewExtractor(params)
|
||||
aos, _ := e.ExtractAosData()
|
||||
dats, _ := e.ExtractOriginalImageData(aos)
|
||||
aos, err := e.ExtractAosData()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
dats, err := e.ExtractOriginalImageData(aos)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
if len(dats) == 0 {
|
||||
panic(fmt.Errorf("no segment data found"))
|
||||
}
|
||||
|
||||
for i, d := range dats {
|
||||
e.SeprateAuxAndImgData(d, i)
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ var (
|
||||
)
|
||||
|
||||
func (e *Extractor) ExtractAux(auxfile, xlsxfile string) ([]*AuxFrameHead, []*AuxFocalBox, []*AuxPlatform, error) {
|
||||
log.Println("extract aux data from", auxfile, "to", xlsxfile)
|
||||
os.Remove(xlsxfile)
|
||||
if err := createAuxXlsx(xlsxfile); err != nil {
|
||||
return nil, nil, nil, err
|
||||
|
||||
@@ -57,14 +57,14 @@ const L0TPL = `<?xml version="1.0" encoding="UTF-8"?>
|
||||
<inputFileList>
|
||||
<inputdata>{{.InputData}}</inputdata>
|
||||
</inputFileList>
|
||||
<outputfilelist num="3">
|
||||
<outputfilelist>
|
||||
<outputPath>{{.OutputPath}}</outputPath>
|
||||
<TempPath>{{.TempPath}}</TempPath>
|
||||
<reportFile>{{.ReportFile}}</reportFile>
|
||||
<resultFile>{{.ResultFile}}</resultFile>
|
||||
</outputfilelist>
|
||||
<params>
|
||||
<stationId>WN</stationId>
|
||||
<stationId>QH</stationId>
|
||||
<sensor>PMS</sensor>
|
||||
<dataId>{{.DataId}}</dataId>
|
||||
<satelliteId>SJY01</satelliteId>
|
||||
|
||||
@@ -38,8 +38,8 @@ func init() {
|
||||
FullTimestamp: true,
|
||||
TimestampFormat: "2006-01-02.15:04:05",
|
||||
ForceFormatting: true,
|
||||
ForceColors: true,
|
||||
DisableColors: false,
|
||||
ForceColors: false,
|
||||
DisableColors: true,
|
||||
}
|
||||
fileFormatter = &prefixed.TextFormatter{
|
||||
FullTimestamp: true,
|
||||
|
||||
Reference in New Issue
Block a user