Esempio n. 1
0
fcppt::log::object::object(
    fcppt::log::detail::context_tree &_node,
    fcppt::log::parameters const &_parameters
)
    :
    auto_context_{
    _node,
    _parameters.name()
},
formatter_(
    fcppt::log::format::chain(
        _parameters.formatter(),
        fcppt::log::impl::tree_formatter(
            auto_context_.node()
        )
    )
),
level_streams_(
    _parameters.level_streams()
)
{
}
Esempio n. 2
0
fcppt::log::object::object(
	fcppt::log::parameters const &_param
)
:
	auto_context_(
		_param.context_location(),
		*this
	),
	formatter_(
		fcppt::optional::maybe(
			auto_context_.node(),
			[
				&_param
			]{
				return
					_param.formatter();
			},
			[
				&_param
			](
				fcppt::reference<
					fcppt::log::detail::context_tree
				> const _node
			)
			{
				return
					fcppt::log::impl::tree_formatter(
						_node.get(),
						_param.formatter()
					);
			}
		)
	),
	level_streams_(
		_param.level_streams()
	),
	enabled_levels_(
		_param.enabled_levels()
	),
	enabled_(
		_param.enabled()
	)
{
}