from typing import Any


def get_logging_id(obj: Any) -> Any:
    """Returns logging ID for object.

    Arguments:
        obj: Any object

    Returns:
        1. `logging_id` attribute if `obj` does have it, or..
        2. `__qualname__` attribute if `obj` does have it, or..
        3. `str(obj)`
    """
    return getattr(obj, 'logging_id', getattr(obj, '__qualname__', str(obj)))