summaryrefslogtreecommitdiff
path: root/i
diff options
context:
space:
mode:
authorhaller2006-05-07 22:22:25 +0000
committerhaller2006-05-07 22:22:25 +0000
commitacf7840edf430d36ec01ad7ddbe98a7e490ba215 (patch)
tree2357c740f9409e7504783993d1e95cc2501adc8a /i
parentc768e610aa4ec4cbd11a919e65ee984d8d71b868 (diff)
* Modification du Mafefile.defs de log
* Integration du LogServer dans la factory
Diffstat (limited to 'i')
-rw-r--r--i/marvin/src/log/Makefile.defs5
-rw-r--r--i/marvin/src/log/data_circular_buffer_factory.cc11
2 files changed, 14 insertions, 2 deletions
diff --git a/i/marvin/src/log/Makefile.defs b/i/marvin/src/log/Makefile.defs
index 1325874..43aaed4 100644
--- a/i/marvin/src/log/Makefile.defs
+++ b/i/marvin/src/log/Makefile.defs
@@ -1,11 +1,12 @@
PROGRAMS += test_log test_log_server
+log_server_OBJECTS = log_server.o $(socket_databuffer_OBJECTS)
+
log_OBJECTS = log.o log_message.o logger.o \
logger_stdout.o logger_file.o logger_ram.o \
data_circular_buffer_factory.o \
+ $(log_server_OBJECTS) \
$(config_OBJECTS) $(data_OBJECTS)
-log_server_OBJECTS = log_server.o $(socket_databuffer_OBJECTS)
-
test_log_OBJECTS = test_log.o $(log_OBJECTS)
test_log_server_OBJECTS = test_log_server.o $(log_server_OBJECTS) $(data_OBJECTS)
diff --git a/i/marvin/src/log/data_circular_buffer_factory.cc b/i/marvin/src/log/data_circular_buffer_factory.cc
index 231f57b..a45d3bc 100644
--- a/i/marvin/src/log/data_circular_buffer_factory.cc
+++ b/i/marvin/src/log/data_circular_buffer_factory.cc
@@ -23,6 +23,9 @@
//
// }}}
#include "data_circular_buffer_factory.hh"
+#include "log_server.hh"
+
+#include <iostream>
/// Initialisation of static member.
DataCircularBuffer *DataCircularBufferFactory::dbBuffer_ = 0;
@@ -41,6 +44,14 @@ DataCircularBufferFactory::~DataCircularBufferFactory (void)
if (!refCount_ && dbBuffer_)
{
// XXX Create a server in a try/catch block for removing exception.
+ try
+ {
+ LogServer(*dbBuffer_, "", 2442);
+ }
+ catch(std::exception & ex)
+ {
+ std::cout << ex.what() << std::endl;
+ }
// uint8_t c;
// while (dbBuffer_-> read (&c, 1))
// std::cout << c;