亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? loggingconfigurator.cpp

?? This software aims to create an applet and panel tools to manage a wireless interface card, such as
?? CPP
字號:
//
// LoggingConfigurator.cpp
//
// $Id: //poco/Main/Util/src/LoggingConfigurator.cpp#1 $
//
// Copyright (c) 2004-2005, Guenter Obiltschnig/Applied Informatics.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// 1. Redistributions of source code must retain the above copyright
//    notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
//    notice, this list of conditions and the following disclaimer in the
//    documentation and/or other materials provided with the distribution.
//
// 3. Redistributions in any form must be accompanied by information on
//    how to obtain complete source code for this software and any
//    accompanying software that uses this software.  The source code
//    must either be included in the distribution or be available for no
//    more than the cost of distribution plus a nominal fee, and must be
//    freely redistributable under reasonable conditions.  For an
//    executable file, complete source code means the source code for all
//    modules it contains.  It does not include source code for modules or
//    files that typically accompany the major components of the operating
//    system on which the executable file runs.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//


#include "Util/LoggingConfigurator.h"
#include "Util/AbstractConfiguration.h"
#include "Foundation/AutoPtr.h"
#include "Foundation/Channel.h"
#include "Foundation/FormattingChannel.h"
#include "Foundation/Formatter.h"
#include "Foundation/PatternFormatter.h"
#include "Foundation/Logger.h"
#include "Foundation/LoggingRegistry.h"
#include "Foundation/LoggingFactory.h"


using Foundation::AutoPtr;
using Foundation::Formatter;
using Foundation::PatternFormatter;
using Foundation::Channel;
using Foundation::FormattingChannel;
using Foundation::Logger;
using Foundation::LoggingRegistry;
using Foundation::LoggingFactory;


Util_BEGIN


LoggingConfigurator::LoggingConfigurator()
{
}


LoggingConfigurator::~LoggingConfigurator()
{
}


void LoggingConfigurator::configure(AbstractConfiguration* pConfig)
{
	poco_check_ptr (pConfig);

	AutoPtr<AbstractConfiguration> pFormattersConfig = pConfig->createView("logging.formatters");
	configureFormatters(pFormattersConfig);

	AutoPtr<AbstractConfiguration> pChannelsConfig = pConfig->createView("logging.channels");
	configureChannels(pChannelsConfig);

	AutoPtr<AbstractConfiguration> pLoggersConfig = pConfig->createView("logging.loggers");
	configureLoggers(pLoggersConfig);
}


void LoggingConfigurator::configureFormatters(AbstractConfiguration* pConfig)
{
	AbstractConfiguration::Keys formatters;
	pConfig->keys(formatters);
	for (AbstractConfiguration::Keys::const_iterator it = formatters.begin(); it != formatters.end(); ++it)
	{
		AutoPtr<AbstractConfiguration> pFormatterConfig = pConfig->createView(*it);
		AutoPtr<Formatter> pFormatter = createFormatter(pFormatterConfig);
		LoggingRegistry::defaultRegistry().registerFormatter(*it, pFormatter);
	}
}


void LoggingConfigurator::configureChannels(AbstractConfiguration* pConfig)
{
	AbstractConfiguration::Keys channels;
	pConfig->keys(channels);
	for (AbstractConfiguration::Keys::const_iterator it = channels.begin(); it != channels.end(); ++it)
	{
		AutoPtr<AbstractConfiguration> pChannelConfig = pConfig->createView(*it);
		AutoPtr<Channel> pChannel = createChannel(pChannelConfig);
		LoggingRegistry::defaultRegistry().registerChannel(*it, pChannel);
	}
}


void LoggingConfigurator::configureLoggers(AbstractConfiguration* pConfig)
{
	AbstractConfiguration::Keys loggers;
	pConfig->keys(loggers);
	for (AbstractConfiguration::Keys::const_iterator it = loggers.begin(); it != loggers.end(); ++it)
	{
		AutoPtr<AbstractConfiguration> pLoggerConfig = pConfig->createView(*it);
		configureLogger(pLoggerConfig);
	}
}


Formatter* LoggingConfigurator::createFormatter(AbstractConfiguration* pConfig)
{
	AutoPtr<Formatter> pFormatter = LoggingFactory::defaultFactory().createFormatter(pConfig->getString("class"));
	AbstractConfiguration::Keys props;
	pConfig->keys(props);
	for (AbstractConfiguration::Keys::const_iterator it = props.begin(); it != props.end(); ++it)
	{
		if (*it != "class")
			pFormatter->setProperty(*it, pConfig->getString(*it));		
	}
	return pFormatter.duplicate();
}


Channel* LoggingConfigurator::createChannel(AbstractConfiguration* pConfig)
{
	AutoPtr<Channel> pChannel = LoggingFactory::defaultFactory().createChannel(pConfig->getString("class"));
	AutoPtr<Channel> pWrapper = pChannel;
	AbstractConfiguration::Keys props;
	pConfig->keys(props);
	for (AbstractConfiguration::Keys::const_iterator it = props.begin(); it != props.end(); ++it)
	{
		if (*it == "pattern")
		{
			AutoPtr<Formatter> pPatternFormatter = new PatternFormatter(pConfig->getString(*it));
			pWrapper = new FormattingChannel(pPatternFormatter, pChannel);
		}
		else if (*it == "formatter")
		{
			AutoPtr<FormattingChannel> pFormattingChannel = new FormattingChannel(0, pChannel);
			if (pConfig->hasProperty("formatter.class"))
			{
				AutoPtr<AbstractConfiguration> pFormatterConfig = pConfig->createView(*it);	
				AutoPtr<Formatter> pFormatter = createFormatter(pFormatterConfig);
				pFormattingChannel->setFormatter(pFormatter);
			}
			else pFormattingChannel->setProperty(*it, pConfig->getString(*it));
			pWrapper = pFormattingChannel;
		}
		else if (*it != "class")
		{
			pChannel->setProperty(*it, pConfig->getString(*it));
		}
	}
	return pWrapper.duplicate();
}


void LoggingConfigurator::configureLogger(AbstractConfiguration* pConfig)
{
	Logger& logger = Logger::get(pConfig->getString("name", ""));
	AbstractConfiguration::Keys props;
	pConfig->keys(props);
	for (AbstractConfiguration::Keys::const_iterator it = props.begin(); it != props.end(); ++it)
	{
		if (*it == "channel" && pConfig->hasProperty("channel.class"))
		{
			AutoPtr<AbstractConfiguration> pChannelConfig = pConfig->createView(*it);	
			AutoPtr<Channel> pChannel = createChannel(pChannelConfig);
			logger.setChannel(pChannel);
		}
		else if (*it != "name")
		{
			logger.setProperty(*it, pConfig->getString(*it));
		}
	}
}


Util_END

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品三区四区| 成人免费高清视频| 91精品国产综合久久香蕉麻豆| 中文一区二区在线观看| 欧美精品亚洲一区二区在线播放| 国产精品久久久久久久裸模 | 蜜臀91精品一区二区三区 | 亚洲老司机在线| 91首页免费视频| 亚洲欧美日韩国产一区二区三区| 成人丝袜高跟foot| 国产精品午夜电影| 本田岬高潮一区二区三区| 国产精品久久久久久久久久久免费看 | 欧美在线一区二区| 亚洲精品国产品国语在线app| 成人黄色片在线观看| 国产精品理论片| 91丝袜美腿高跟国产极品老师| 亚洲欧美成人一区二区三区| 色天使色偷偷av一区二区| 日韩理论片网站| 在线免费观看成人短视频| 婷婷综合五月天| 精品国内片67194| 成人亚洲一区二区一| 亚洲午夜在线观看视频在线| 日韩欧美在线影院| 丁香亚洲综合激情啪啪综合| 亚洲一区二区三区四区五区中文| 日韩午夜精品电影| 99久久久国产精品免费蜜臀| 亚洲第一主播视频| 国产色91在线| 精品视频一区二区三区免费| 精品无码三级在线观看视频| 国产精品美女久久久久久久久| 欧美午夜精品理论片a级按摩| 麻豆久久久久久| 一区二区三区成人在线视频| 久久精品人人爽人人爽| 欧美日韩综合不卡| 99久久精品国产毛片| 国内成人精品2018免费看| 亚洲成人动漫在线免费观看| 国产一二精品视频| 午夜电影一区二区三区| 亚洲免费在线观看视频| 国产性天天综合网| 精品久久国产老人久久综合| 欧美亚洲高清一区二区三区不卡| 丁香啪啪综合成人亚洲小说| 青娱乐精品在线视频| 亚洲一区二区av电影| 亚洲日本一区二区三区| 国产亚洲美州欧州综合国| 3d成人动漫网站| 欧美二区在线观看| 欧美日韩视频不卡| 在线亚洲一区二区| 色哟哟一区二区| 色一区在线观看| 欧美视频一区二区三区在线观看| 97久久超碰国产精品| 成人免费看黄yyy456| 丁香六月综合激情| 成人免费观看视频| 不卡影院免费观看| 99精品久久只有精品| 白白色亚洲国产精品| 色综合天天综合网天天看片| 一本到三区不卡视频| 在线视频欧美精品| 亚洲三级电影全部在线观看高清| 亚洲精品成人精品456| 亚洲成人av福利| 另类中文字幕网| 国产做a爰片久久毛片| 成人午夜在线视频| 色94色欧美sute亚洲线路二 | 99久久婷婷国产综合精品| 99国产精品久久久久久久久久久| 97久久超碰国产精品电影| 欧美人xxxx| 久久久久久久综合狠狠综合| 综合久久一区二区三区| 午夜精品福利在线| 成人午夜精品一区二区三区| 欧美午夜精品理论片a级按摩| 精品99一区二区三区| 中日韩免费视频中文字幕| 亚洲国产成人av网| 国产乱码一区二区三区| 日本精品一级二级| 久久午夜老司机| 亚洲成人动漫av| 91色九色蝌蚪| 亚洲欧美日韩一区二区| 日韩精品国产精品| 91福利在线导航| 欧美高清在线精品一区| 日韩不卡一区二区| 91蜜桃传媒精品久久久一区二区| 欧美成人伊人久久综合网| 亚洲国产另类av| 95精品视频在线| 久久久久久免费网| 免费久久99精品国产| 在线视频欧美精品| 最新高清无码专区| 国产精品99久久久| 精品国免费一区二区三区| 日韩高清不卡在线| 欧美三级韩国三级日本三斤| 亚洲欧洲日韩一区二区三区| 国产成人精品网址| 久久精品视频在线免费观看 | 婷婷亚洲久悠悠色悠在线播放| 色又黄又爽网站www久久| 亚洲色图一区二区三区| 92国产精品观看| 亚洲乱码一区二区三区在线观看| 成人污污视频在线观看| 国产精品乱码一区二区三区软件| 国产一区二区导航在线播放| 欧美不卡视频一区| 精品午夜一区二区三区在线观看| 国产盗摄视频一区二区三区| 欧美一级专区免费大片| 久久se精品一区精品二区| 日韩亚洲欧美一区| 久久99精品久久久久婷婷| 欧美大片顶级少妇| 国产成人一区在线| 亚洲欧美激情插 | 一区二区三区在线观看动漫| 在线免费不卡电影| 蜜桃视频在线观看一区| 久久这里只有精品6| 99精品视频在线观看免费| 亚洲va欧美va人人爽| 日韩精品一区二区在线观看| 国产一区二区h| 亚洲另类在线视频| 精品久久久久久亚洲综合网 | 久久综合丝袜日本网| 91视频免费观看| 国产在线精品一区二区夜色| 欧美激情中文字幕一区二区| 欧美在线一区二区| 国产九色精品成人porny| 亚洲乱码国产乱码精品精98午夜 | 一色桃子久久精品亚洲| 91精品国产高清一区二区三区 | 久久久久久久久久久久久夜| 99久久夜色精品国产网站| 奇米精品一区二区三区在线观看一| 久久久久一区二区三区四区| 在线观看三级视频欧美| 国产精品综合视频| 午夜精品在线视频一区| 最新国产の精品合集bt伙计| 精品电影一区二区三区| 在线精品视频一区二区三四| 国产酒店精品激情| 免费不卡在线观看| 亚洲777理论| 亚洲一二三区在线观看| 国产成都精品91一区二区三 | 欧美精品黑人性xxxx| 99re热视频精品| 不卡视频在线观看| 国产精品一区二区免费不卡| 美女mm1313爽爽久久久蜜臀| 天天综合天天综合色| 亚洲激情网站免费观看| 亚洲丝袜制服诱惑| 国产精品久久二区二区| 欧美激情在线观看视频免费| 国产欧美日韩综合| 国产日韩精品视频一区| 精品三级在线观看| 欧美精品一区二区三区在线| 精品国产区一区| 久久综合网色—综合色88| 久久亚洲二区三区| 久久久久久久综合色一本| 久久久不卡网国产精品一区| 精品sm在线观看| 久久久久久久免费视频了| 国产欧美精品一区二区色综合 | 国产伦精品一区二区三区视频青涩| 91免费观看国产| 在线精品亚洲一区二区不卡| 欧美中文字幕一二三区视频| 欧美精品aⅴ在线视频| 久久亚洲二区三区| 国产精品久久久久影院| 一区二区三区成人| 久久国产欧美日韩精品|