Clean error logging
This commit is contained in:
@@ -83,7 +83,7 @@ extension KissIndex {
|
||||
let increateRatio = Double(increased * 100) / Double(holdQuantity2)
|
||||
if abs(increateRatio) >= 1.0 {
|
||||
let productNo = startPrice.shortProductCode
|
||||
printError(productNo, increateRatio)
|
||||
//printError(productNo, increateRatio)
|
||||
|
||||
upLock.lock()
|
||||
if let _ = up[productNo] {
|
||||
|
||||
@@ -24,19 +24,19 @@ class KissIndex: KissMe.ShopContext {
|
||||
func run() {
|
||||
guard CommandLine.argc >= 4 else {
|
||||
let appName = (CommandLine.arguments[0] as NSString).lastPathComponent
|
||||
print("\(appName) KMI-0001 yyyyMMdd HHmmss [config.json]")
|
||||
printError("\(appName) KMI-0001 yyyyMMdd HHmmss [config.json]")
|
||||
return
|
||||
}
|
||||
|
||||
guard let kmi = CommandLine.arguments[1].kmiIndex else {
|
||||
print("Invalid KMI index name")
|
||||
printError("Invalid KMI index name")
|
||||
return
|
||||
}
|
||||
|
||||
let day = CommandLine.arguments[2]
|
||||
let hour = CommandLine.arguments[3]
|
||||
guard let date = Date.date(yyyyMMdd: day, HHmmss: hour) else {
|
||||
print("Invalid timestamp: \(day) \(hour)")
|
||||
printError("Invalid timestamp: \(day) \(hour)")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ class KissIndex: KissMe.ShopContext {
|
||||
indexSet_0006(date: date, config: config, kmi: kmiType!)
|
||||
|
||||
default:
|
||||
print("Unsupported index set: \(kmi)")
|
||||
printError("Unsupported index set: \(kmi)")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ extension KissIndex {
|
||||
desiredDate = desiredDate!.changing(year: yyyy, month: mm, day: dd-prevDay)
|
||||
desired_yyyyMMdd = desiredDate!.yyyyMMdd
|
||||
prevDay += 1
|
||||
printError(item.shortCode, desired_yyyyMMdd)
|
||||
//printError(item.shortCode, desired_yyyyMMdd)
|
||||
}
|
||||
|
||||
targetPrices.sort(by: { $0.stockDateTime > $1.stockDateTime })
|
||||
|
||||
@@ -121,9 +121,9 @@ class KissMatrix {
|
||||
return taskResult
|
||||
}
|
||||
|
||||
for result in indexResult {
|
||||
print(result)
|
||||
}
|
||||
//for result in indexResult {
|
||||
// print(result)
|
||||
//}
|
||||
semaphore.signal()
|
||||
}
|
||||
semaphore.wait()
|
||||
|
||||
Reference in New Issue
Block a user