File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,10 @@ import GHC.Stack (HasCallStack)
2626import LogAnalysis.Types (Analysis , Knowledge (.. ), ErrorCode , toTag )
2727import Util (tshow )
2828
29+ -- | Number of error texts it should show
30+ numberOfErrorText :: Int
31+ numberOfErrorText = 3
32+
2933-- | Analyze each log file based on the knowlodgebases' data.
3034extractIssuesFromLogs :: [LBS. ByteString ] -> Analysis -> Either String Analysis
3135extractIssuesFromLogs files analysis = filterAnalysis $ foldl' runClassifiers analysis files
@@ -53,7 +57,7 @@ filterAnalysis as = do
5357 let filteredAnalysis = Map. filter (/= [] ) as
5458 if null filteredAnalysis
5559 then Left " Cannot find any known issues"
56- else return $ Map. map (take 3 ) filteredAnalysis
60+ else return $ Map. map (take numberOfErrorText ) filteredAnalysis
5761
5862readZip :: HasCallStack => LBS. ByteString -> Either String (Map FilePath LBS. ByteString )
5963readZip rawzip = case Zip. toArchiveOrFail rawzip of
You can’t perform that action at this time.
0 commit comments