summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-12-04 23:55:19 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-12-06 16:43:45 +0200
commitcc7d204b2c51853f7d963d144f5944e209e7ea29 (patch)
tree8b1efa886ed2c70222e1b0bb846baaa700e0b3bf
parentedbd2059d8a4bd759302ada4368fa4055638fd7f (diff)
libcamera: Use the logger instead of cout
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--include/libcamera/libcamera.h4
-rw-r--r--src/libcamera/main.cpp10
-rw-r--r--test/init.cpp2
3 files changed, 11 insertions, 5 deletions
diff --git a/include/libcamera/libcamera.h b/include/libcamera/libcamera.h
index 64857326..790771b6 100644
--- a/include/libcamera/libcamera.h
+++ b/include/libcamera/libcamera.h
@@ -7,10 +7,14 @@
#ifndef __LIBCAMERA_LIBCAMERA_H__
#define __LIBCAMERA_LIBCAMERA_H__
+namespace libcamera {
+
class libcamera
{
public:
void init_lib(void);
};
+};
+
#endif /* __LIBCAMERA_LIBCAMERA_H__ */
diff --git a/src/libcamera/main.cpp b/src/libcamera/main.cpp
index 0059e0c9..7ed37dfc 100644
--- a/src/libcamera/main.cpp
+++ b/src/libcamera/main.cpp
@@ -5,13 +5,15 @@
* main.cpp - libcamera main class
*/
-#include <iostream>
#include <libcamera/libcamera.h>
-using std::cout;
-using std::endl;
+#include "log.h"
+
+namespace libcamera {
void libcamera::init_lib(void)
{
- cout << "Lib Camera Init" << endl;
+ LOG(Info) << "Lib Camera Init";
}
+
+};
diff --git a/test/init.cpp b/test/init.cpp
index 97948b9c..4ade4e76 100644
--- a/test/init.cpp
+++ b/test/init.cpp
@@ -9,7 +9,7 @@
int main(void)
{
- libcamera l = libcamera();
+ libcamera::libcamera l = libcamera::libcamera();
l.init_lib();
return 0;