package com.gh.gamecenter.qqmini;

import android.util.Log;

import androidx.annotation.Keep;

import com.tencent.qqmini.sdk.launcher.core.proxy.LogProxy;

@Keep
public class LogProxyImpl extends LogProxy {
    @Override
    public void log(int logLevel, String tag, String msg, Throwable t) {
        switch (logLevel) {
            case com.tencent.qqmini.sdk.launcher.log.Log.DEBUG:
                if (t == null) {
                    Log.d(tag, msg);
                } else {
                    Log.d(tag, msg, t);
                }
                break;
            case com.tencent.qqmini.sdk.launcher.log.Log.INFO:
                if (t == null) {
                    Log.i(tag, msg);
                } else {
                    Log.i(tag, msg, t);
                }
                break;
            case com.tencent.qqmini.sdk.launcher.log.Log.WARN:
                if (t == null) {
                    Log.w(tag, msg);
                } else {
                    Log.w(tag, msg, t);
                }
                break;
            case com.tencent.qqmini.sdk.launcher.log.Log.ERROR:
                if (t == null) {
                    Log.e(tag, msg);
                } else {
                    Log.e(tag, msg, t);
                }
                break;
            default:
                if (t == null) {
                    Log.v(tag, msg);
                } else {
                    Log.v(tag, msg, t);
                }
                break;
        }
    }
}