/*
 * Decompiled with CFR 0_110.
 * 
 * Could not load the following classes:
 *  android.util.Log
 *  java.io.IOException
 *  java.lang.NoSuchFieldError
 *  java.lang.Object
 *  java.lang.String
 *  java.lang.Throwable
 */
package com.google.code.microlog4android.appender;

import android.util.Log;
import com.google.code.microlog4android.Level;
import com.google.code.microlog4android.appender.AbstractAppender;
import com.google.code.microlog4android.format.Formatter;
import java.io.IOException;

/*
 * Exception performing whole class analysis ignored.
 */
public class LogCatAppender
extends AbstractAppender {
    private static /* synthetic */ int[] $SWITCH_TABLE$com$google$code$microlog4android$Level;

    /*
     * Unable to fully structure code
     * Enabled aggressive exception aggregation
     */
    static /* synthetic */ int[] $SWITCH_TABLE$com$google$code$microlog4android$Level() {
        var0 = LogCatAppender.$SWITCH_TABLE$com$google$code$microlog4android$Level;
        if (var0 != null) {
            return var0;
        }
        var1_1 = new int[Level.values().length];
        try {
            var1_1[Level.DEBUG.ordinal()] = 5;
        }
        catch (NoSuchFieldError var2_8) {
            ** continue;
        }
lbl9: // 2 sources:
        do {
            try {
                var1_1[Level.ERROR.ordinal()] = 2;
            }
            catch (NoSuchFieldError var3_7) {
                ** continue;
            }
lbl14: // 2 sources:
            do {
                try {
                    var1_1[Level.FATAL.ordinal()] = 1;
                }
                catch (NoSuchFieldError var4_6) {
                    ** continue;
                }
lbl19: // 2 sources:
                do {
                    try {
                        var1_1[Level.INFO.ordinal()] = 4;
                    }
                    catch (NoSuchFieldError var5_5) {
                        ** continue;
                    }
lbl24: // 2 sources:
                    do {
                        try {
                            var1_1[Level.OFF.ordinal()] = 7;
                        }
                        catch (NoSuchFieldError var6_4) {
                            ** continue;
                        }
lbl29: // 2 sources:
                        do {
                            try {
                                var1_1[Level.TRACE.ordinal()] = 6;
                            }
                            catch (NoSuchFieldError var7_3) {
                                ** continue;
                            }
lbl34: // 2 sources:
                            do {
                                try {
                                    var1_1[Level.WARN.ordinal()] = 3;
                                }
                                catch (NoSuchFieldError var8_2) {
                                    ** continue;
                                }
lbl39: // 2 sources:
                                do {
                                    LogCatAppender.$SWITCH_TABLE$com$google$code$microlog4android$Level = var1_1;
                                    return var1_1;
                                    break;
                                } while (true);
                                break;
                            } while (true);
                            break;
                        } while (true);
                        break;
                    } while (true);
                    break;
                } while (true);
                break;
            } while (true);
            break;
        } while (true);
    }

    public LogCatAppender() {
    }

    @Override
    public void clear() {
    }

    @Override
    public void close() throws IOException {
        this.logOpen = false;
    }

    /*
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    @Override
    public void doLog(String string2, String string3, long l, Level level, Object object, Throwable throwable) {
        if (!this.logOpen || this.formatter == null) return;
        switch (LogCatAppender.$SWITCH_TABLE$com$google$code$microlog4android$Level()[level.ordinal()]) {
            default: {
                return;
            }
            case 1: 
            case 2: {
                Log.e((String)string2, (String)this.formatter.format(string2, string3, l, level, object, throwable));
                return;
            }
            case 3: {
                Log.w((String)string2, (String)this.formatter.format(string2, string3, l, level, object, throwable));
                return;
            }
            case 4: {
                Log.i((String)string2, (String)this.formatter.format(string2, string3, l, level, object, throwable));
                return;
            }
            case 5: 
            case 6: 
        }
        Log.d((String)string2, (String)this.formatter.format(string2, string3, l, level, object, throwable));
    }

    @Override
    public long getLogSize() {
        return -1;
    }

    @Override
    public void open() throws IOException {
        this.logOpen = true;
    }
}

