X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Ftelemetry%2Fbundle_bpf.py;h=b9baeab7cae3ab56361c795ac3babb7ec7e2e575;hp=655152cb2755926bbdd49742c9ce9e6a4dcf6ae7;hb=d743892c7ea9dcae6038660b57b94c9578f7f7f4;hpb=944fdd776eb68211a3e58648d1d2ebd9a12f0636 diff --git a/resources/tools/telemetry/bundle_bpf.py b/resources/tools/telemetry/bundle_bpf.py index 655152cb27..b9baeab7ca 100644 --- a/resources/tools/telemetry/bundle_bpf.py +++ b/resources/tools/telemetry/bundle_bpf.py @@ -17,6 +17,7 @@ from logging import getLogger import sys from bcc import BPF +from .constants import Constants class BundleBpf: @@ -67,8 +68,8 @@ class BundleBpf: sample_period=duration ) except AttributeError: - getLogger(__name__).error(u"Cannot attach BPF events!") - sys.exit(1) + getLogger("console_stderr").error(u"Could not attach BPF events!") + sys.exit(Constants.err_linux_attach) def detach(self): """ @@ -81,8 +82,8 @@ class BundleBpf: ev_config=event[u"name"] ) except AttributeError: - getLogger(__name__).error(u"Cannot dettach BPF events!") - sys.exit(1) + getLogger("console_stderr").error(u"Could not detach BPF events!") + sys.exit(Constants.err_linux_detach) def fetch_data(self): """