You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
556 B

#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import logging
_log_handlers: dict[str, logging.Handler] = {
"console": logging.StreamHandler(),
"dynamic_rendezvous": logging.NullHandler(),
"null": logging.NullHandler(),
}
def get_logging_handler(destination: str = "null") -> logging.Handler:
global _log_handlers
return _log_handlers[destination]