[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 23/50: controlport: cleaning up and using l
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 23/50: controlport: cleaning up and using logger to display endpoint. |
Date: |
Wed, 15 Apr 2015 21:07:54 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit f32872a97c290778f7f3eec037df9fe0d03be792
Author: Tom Rondeau <address@hidden>
Date: Mon Mar 2 17:43:22 2015 -0500
controlport: cleaning up and using logger to display endpoint.
---
.../include/gnuradio/thrift_server_template.h | 28 ++++++++++++----------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/gnuradio-runtime/include/gnuradio/thrift_server_template.h
b/gnuradio-runtime/include/gnuradio/thrift_server_template.h
index 5731658..0676826 100644
--- a/gnuradio-runtime/include/gnuradio/thrift_server_template.h
+++ b/gnuradio-runtime/include/gnuradio/thrift_server_template.h
@@ -24,6 +24,7 @@
#define THRIFT_SERVER_TEMPLATE_H
#include <gnuradio/prefs.h>
+#include <gnuradio/logger.h>
#include <gnuradio/rpcserver_thrift.h>
#include <gnuradio/thrift_application_base.h>
#include <iostream>
@@ -96,26 +97,25 @@ thrift_server_template<TserverBase, TserverClass,
TImplClass, TThriftClass>::thr
d_contolPortName(controlPortName),
d_endpointName(endpointName)
{
- //std::cerr << "thrift_server_template: ctor" << std::endl;
+ gr::logger_ptr logger, debug_logger;
+ gr::configure_default_loggers(logger, debug_logger, "controlport");
+
+ //GR_LOG_DEBUG(debug_logger, "thrift_server_template: ctor");
unsigned int port, nthreads, buffersize;
std::string thrift_config_file =
gr::prefs::singleton()->get_string("ControlPort", "config", "");
if(thrift_config_file.length() > 0) {
gr::prefs::singleton()->add_config_file(thrift_config_file);
- port = static_cast<unsigned
int>(gr::prefs::singleton()->get_long("thrift", "port",
- thrift_application_base<TserverBase,
TImplClass>::d_default_thrift_port));
- nthreads = static_cast<unsigned
int>(gr::prefs::singleton()->get_long("thrift", "nthreads",
- thrift_application_base<TserverBase,
TImplClass>::d_default_num_thrift_threads));
- buffersize = static_cast<unsigned
int>(gr::prefs::singleton()->get_long("thrift", "buffersize",
- ALRIGHT_DEFAULT_BUFFER_SIZE));
- }
- else {
- port = thrift_application_base<TserverBase,
TImplClass>::d_default_thrift_port;
- nthreads = thrift_application_base<TserverBase,
TImplClass>::d_default_num_thrift_threads;
- buffersize = ALRIGHT_DEFAULT_BUFFER_SIZE;
}
+ port = static_cast<unsigned int>(gr::prefs::singleton()->get_long("thrift",
"port",
+ thrift_application_base<TserverBase,
TImplClass>::d_default_thrift_port));
+ nthreads = static_cast<unsigned
int>(gr::prefs::singleton()->get_long("thrift", "nthreads",
+ thrift_application_base<TserverBase,
TImplClass>::d_default_num_thrift_threads));
+ buffersize = static_cast<unsigned
int>(gr::prefs::singleton()->get_long("thrift", "buffersize",
+ ALRIGHT_DEFAULT_BUFFER_SIZE));
+
boost::shared_ptr<TserverClass> handler(new TserverClass());
boost::shared_ptr<thrift::TProcessor>
@@ -156,6 +156,10 @@ thrift_server_template<TserverBase, TserverClass,
TImplClass, TThriftClass>::thr
threadManager);
}
+ // Define the endpoint
+ int used_port =
((thrift::transport::TServerSocket*)serverTransport.get())->getPort();
+ GR_LOG_INFO(logger, boost::format("Apache Thrift Endpoint on port %1%") %
used_port);
+
d_server = handler.get();
}
- [Commit-gnuradio] [gnuradio] 04/50: controlport: restructuring to add subdirs for different cp backends., (continued)
- [Commit-gnuradio] [gnuradio] 04/50: controlport: restructuring to add subdirs for different cp backends., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 18/50: controlport: improving transport layer throughput., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 07/50: controlport: Addes a FindThrift cmake module to find the Thrift headers, libraries, and Python files., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 17/50: controlport: convert to To_PMT registration objects, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 20/50: runtime: more generic version of prefs class., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 22/50: cmake: force QA tests to turn ControlPort off by default., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 15/50: controlport: convert rpcpmtconverter::to_pmt() if statement to a function object map, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 01/50: Initial thrift definition for gnuradio, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 14/50: controlport: Thrift's binary type, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 09/50: controlport: cleanup and switching over to new Python common interface., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 23/50: controlport: cleaning up and using logger to display endpoint.,
git <=
- [Commit-gnuradio] [gnuradio] 34/50: controlport: replacement of nanosleep() with boost::sleep() in startup thread. Fix of merge error in booter_thrift., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 28/50: controlport: more cleaning up., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 31/50: controlport: moving the logger call that publishes Thrift's endpoint to i_impl()., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 24/50: controlport: adding performance and controlport monitor GRC blocks., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 29/50: controlport: changing the default port number on the Thrift interface to zero., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 21/50: controlport: Adds ability to configure Thrift through a config file, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 30/50: controlport: ephemeral / unused port number selection by OS working., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 13/50: controlport: using threaded server for multiple connections., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 39/50: controlport: documentation cleanup, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 35/50: controlport: cleanup, git, 2015/04/16