/*
 * Copyright (C) 2010 Teleal GmbH, Switzerland
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.teleal.cling.support.shared;

import org.teleal.common.swingfwk.logging.LogCategory;

import java.util.ArrayList;
import java.util.logging.Level;

/**
 * @author Christian Bauer
 */
public class LogCategories extends ArrayList<LogCategory> {

    public LogCategories() {
        super(10);

        add(new LogCategory("Network", new LogCategory.Group[]{

                new LogCategory.Group(
                        "UDP communication",
                        new LogCategory.LoggerLevel[]{
                                new LogCategory.LoggerLevel("org.teleal.cling.transport.spi.DatagramIO", Level.FINE),
                                new LogCategory.LoggerLevel("org.teleal.cling.transport.spi.MulticastReceiver", Level.FINE),
                        }
                ),

                new LogCategory.Group(
                        "UDP datagram processing and content",
                        new LogCategory.LoggerLevel[]{
                                new LogCategory.LoggerLevel("org.teleal.cling.transport.spi.DatagramProcessor", Level.FINER)
                        }
                ),

                new LogCategory.Group(
                        "TCP communication",
                        new LogCategory.LoggerLevel[]{
                                new LogCategory.LoggerLevel("org.teleal.cling.transport.spi.UpnpStream", Level.FINER),
                                new LogCategory.LoggerLevel("org.teleal.cling.transport.spi.StreamServer", Level.FINE),
                                new LogCategory.LoggerLevel("org.teleal.cling.transport.spi.StreamClient", Level.FINE),
                        }
                ),

                new LogCategory.Group(
                        "SOAP action message processing and content",
                        new LogCategory.LoggerLevel[]{
                                new LogCategory.LoggerLevel("org.teleal.cling.transport.spi.SOAPActionProcessor", Level.FINER)
                        }
                ),

                new LogCategory.Group(
                        "GENA event message processing and content",
                        new LogCategory.LoggerLevel[]{
                                new LogCategory.LoggerLevel("org.teleal.cling.transport.spi.GENAEventProcessor", Level.FINER)
                        }
                ),

                new LogCategory.Group(
                        "HTTP header processing",
                        new LogCategory.LoggerLevel[]{
                                new LogCategory.LoggerLevel("org.teleal.cling.transport.impl.HttpHeaderConverter", Level.FINER)
                        }
                ),
        }));


        add(new LogCategory("UPnP Protocol", new LogCategory.Group[]{

                new LogCategory.Group(
                        "Discovery (Notification & Search)",
                        new LogCategory.LoggerLevel[]{
                                new LogCategory.LoggerLevel("org.teleal.cling.protocol.ProtocolFactory", Level.FINER),
                                new LogCategory.LoggerLevel("org.teleal.cling.protocol.async", Level.FINER)
                        }
                ),

                new LogCategory.Group(
                        "Description",
                        new LogCategory.LoggerLevel[]{
                                new LogCategory.LoggerLevel("org.teleal.cling.protocol.ProtocolFactory", Level.FINER),
                                new LogCategory.LoggerLevel("org.teleal.cling.protocol.RetrieveRemoteDescriptors", Level.FINE),
                                new LogCategory.LoggerLevel("org.teleal.cling.protocol.sync.ReceivingRetrieval", Level.FINE),
                                new LogCategory.LoggerLevel("org.teleal.cling.binding.xml.DeviceDescriptorBinder", Level.FINE),
                                new LogCategory.LoggerLevel("org.teleal.cling.binding.xml.ServiceDescriptorBinder", Level.FINE),
                        }
                ),

                new LogCategory.Group(
                        "Control",
                        new LogCategory.LoggerLevel[]{
                                new LogCategory.LoggerLevel("org.teleal.cling.protocol.ProtocolFactory", Level.FINER),
                                new LogCategory.LoggerLevel("org.teleal.cling.protocol.sync.ReceivingAction", Level.FINER),
                                new LogCategory.LoggerLevel("org.teleal.cling.protocol.sync.SendingAction", Level.FINER),
                        }
                ),

                new LogCategory.Group(
                        "GENA ",
                        new LogCategory.LoggerLevel[]{
                                new LogCategory.LoggerLevel("org.teleal.cling.model.gena", Level.FINER),
                                new LogCategory.LoggerLevel("org.teleal.cling.protocol.ProtocolFactory", Level.FINER),
                                new LogCategory.LoggerLevel("org.teleal.cling.protocol.sync.ReceivingEvent", Level.FINER),
                                new LogCategory.LoggerLevel("org.teleal.cling.protocol.sync.ReceivingSubscribe", Level.FINER),
                                new LogCategory.LoggerLevel("org.teleal.cling.protocol.sync.ReceivingUnsubscribe", Level.FINER),
                                new LogCategory.LoggerLevel("org.teleal.cling.protocol.sync.SendingEvent", Level.FINER),
                                new LogCategory.LoggerLevel("org.teleal.cling.protocol.sync.SendingSubscribe", Level.FINER),
                                new LogCategory.LoggerLevel("org.teleal.cling.protocol.sync.SendingUnsubscribe", Level.FINER),
                                new LogCategory.LoggerLevel("org.teleal.cling.protocol.sync.SendingRenewal", Level.FINER),
                        }
                ),
        }));

        add(new LogCategory("Core", new LogCategory.Group[]{

                new LogCategory.Group(
                        "Router",
                        new LogCategory.LoggerLevel[]{
                                new LogCategory.LoggerLevel("org.teleal.cling.transport.Router", Level.FINER)
                        }
                ),

                new LogCategory.Group(
                        "Registry",
                        new LogCategory.LoggerLevel[]{
                                new LogCategory.LoggerLevel("org.teleal.cling.registry.Registry", Level.FINER),
                                new LogCategory.LoggerLevel("org.teleal.cling.registry.LocalItems", Level.FINER),
                                new LogCategory.LoggerLevel("org.teleal.cling.registry.RemoteItems", Level.FINER)
                        }
                ),

                new LogCategory.Group(
                        "Local service binding & invocation",
                        new LogCategory.LoggerLevel[]{
                                new LogCategory.LoggerLevel("org.teleal.cling.binding.annotations", Level.FINER),
                                new LogCategory.LoggerLevel("org.teleal.cling.model.meta.LocalService", Level.FINER),
                                new LogCategory.LoggerLevel("org.teleal.cling.model.action", Level.FINER),
                                new LogCategory.LoggerLevel("org.teleal.cling.model.state", Level.FINER),
                                new LogCategory.LoggerLevel("org.teleal.cling.model.DefaultServiceManager", Level.FINER)
                        }
                ),

                new LogCategory.Group(
                        "Control Point interaction",
                        new LogCategory.LoggerLevel[]{
                                new LogCategory.LoggerLevel("org.teleal.cling.controlpoint", Level.FINER),
                        }
                ),
        }));

    }

}
