def METHOD_NAME(name, level, fn, lno, msg, args, exc_info, func=None, sinfo=None, **kwargs):
    """
    Reformat the log message to get something more clean
    """
    # When qt message box is display the correct line number is a part of
    # the name
    if ":" in name:
        name, lno = name.split(":")
        lno = int(lno)
    name = name.replace("gns3.", "")
    try:
        return log_factory(name, level, fn, lno, msg, args, exc_info, func=func, sinfo=sinfo, **kwargs)
    except Exception as e:  # To avoid recursion we just print the message if something is wrong when logging
        print(msg)
        return