class FFmpegLogCallback extends LogCallback {

    private static final Logger logger = Logger.create(FFmpegLogCallback.class);

    static final FFmpegLogCallback instance = new FFmpegLogCallback().retainReference();

    /** Returns an instance that can be used with {@link org.bytedeco.ffmpeg.global.avutil#setLogCallback(LogCallback)}. */
    public static FFmpegLogCallback getInstance() {
        return instance;
    }

    /** Calls {@code avutil.setLogCallback(getInstance())}. */
    public static void set() {
        setLogCallback(getInstance());
    }

    /** Returns {@code av_log_get_level()}. **/
    public static int getLevel() {
        return av_log_get_level();
    }

    /** Calls {@code av_log_set_level(level)}. **/
    public static void setLevel(int level) {
        av_log_set_level(level);
    }

    @Override public void call(int level, BytePointer msg) {<FILL_FUNCTION_BODY>}
}

        switch (level) {
            case AV_LOG_PANIC:
            case AV_LOG_FATAL:
            case AV_LOG_ERROR:
                logger.error(msg.getString());
                break;
            case AV_LOG_WARNING:
                logger.warn(msg.getString());
                break;
            case AV_LOG_INFO:
                logger.info(msg.getString());
                break;
            case AV_LOG_VERBOSE:
            case AV_LOG_DEBUG:
            case AV_LOG_TRACE:
                logger.debug(msg.getString());
                break;
            default:
                assert false;
        }
    
<no_super_class>