/*
 * Decompiled with CFR 0_110.
 * 
 * Could not load the following classes:
 *  java.lang.IllegalArgumentException
 *  java.lang.Object
 *  java.lang.String
 *  java.lang.Throwable
 */
package com.google.code.microlog4android.appender;

import com.google.code.microlog4android.Level;
import com.google.code.microlog4android.appender.DatagramAppender;
import com.google.code.microlog4android.appender.SyslogMessage;
import com.google.code.microlog4android.format.Formatter;

public class SyslogAppender
extends DatagramAppender {
    private SyslogMessage syslogMessage = new SyslogMessage();

    public SyslogAppender() {
        super.setPort(514);
        this.syslogMessage.setTag("microlog");
        this.syslogMessage.setFacility(1);
        this.syslogMessage.setSeverity(7);
    }

    @Override
    public void doLog(String string2, String string3, long l, Level level, Object object, Throwable throwable) {
        if (this.logOpen && this.formatter != null) {
            this.sendMessage(this.syslogMessage.createMessageData(this.formatter.format(string2, string3, l, level, object, throwable)));
        }
    }

    public void setFacility(byte by) {
        this.syslogMessage.setFacility(by);
    }

    public void setHeader(boolean bl) {
        this.syslogMessage.setHeader(bl);
    }

    public void setHostname(String string2) throws IllegalArgumentException {
        this.syslogMessage.setHostname(string2);
    }

    public void setSeverity(byte by) throws IllegalArgumentException {
        this.syslogMessage.setSeverity(by);
    }

    public void setTag(String string2) throws IllegalArgumentException {
        this.syslogMessage.setTag(string2);
    }
}

