logging_t::logging_t(context_t& context, io::reactor_t& reactor, const std::string& name, const Json::Value& args): category_type(context, reactor, name, args) { auto logger = std::ref(context.logger()); using cocaine::logging::logger_concept_t; on<io::logging::emit>("emit", std::bind(&logger_concept_t::emit, logger, _1, _2, _3)); on<io::logging::verbosity>("verbosity", std::bind(&logger_concept_t::verbosity, logger)); }
logging_t::logging_t(context_t& context, io::reactor_t& reactor, const std::string& name, const Json::Value& args): api::service_t(context, reactor, name, args), implementation<io::logging_tag>(context, name) { auto logger = std::ref(context.logger()); using cocaine::logging::logger_concept_t; on<io::logging::emit>(std::bind(&logger_concept_t::emit, logger, _1, _2, _3)); on<io::logging::verbosity>(std::bind(&logger_concept_t::verbosity, logger)); }