I define specific logger which I want to use only for sending messages to Graylog. How do I ban redirecting to console/file? I have other logger which writes to console/file:
import logging
import graypy
logging.basicConfig(level = logging.INFO)
LOGGER0 = logging.getLogger()
LOGGER1 = logging.getLogger("graylog")
handler = graypy.GELFHandler(GRAYLOG_URL, GRAYLOG_PORT, debugging_fields = False)
LOGGER1.addHandler(handler)
LOGGER1.info("some message")
How do I prevent from printing "some message"?