abstract detect and detectLog into BayesianDetector