diff options
author | Adriana Kobylak <anoo@us.ibm.com> | 2017-02-15 13:44:16 -0600 |
---|---|---|
committer | Adriana Kobylak <anoo@linux.vnet.ibm.com> | 2017-02-16 15:53:08 -0600 |
commit | c20dae8656898888505df589c32e9f672e03c648 (patch) | |
tree | 3a9f8bb03767471fc5c01fbfcc3b3f6468e82d73 | |
parent | 5933433652e6f557503b1c8617f71e84340767c0 (diff) | |
download | phosphor-logging-c20dae8656898888505df589c32e9f672e03c648.tar.gz phosphor-logging-c20dae8656898888505df589c32e9f672e03c648.zip |
Create libphosphor-logging library
The commit function would be too big to hold on the
header file. Move it to a library and update the
phosphos-logging.pc file for users to link against it.
Add dependency to libsdbusplus as the commit interface
would make use of the transaction id support.
Change-Id: I237b15e35a633f1da9bf3401b5bf754154f132db
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
-rw-r--r-- | Makefile.am | 12 | ||||
-rw-r--r-- | elog.cpp | 14 | ||||
-rw-r--r-- | elog.hpp | 12 | ||||
-rw-r--r-- | phosphor-logging.pc.in | 2 |
4 files changed, 29 insertions, 11 deletions
diff --git a/Makefile.am b/Makefile.am index fa066a1..1e9d331 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,6 +4,18 @@ include_HEADERS = log.hpp elog.hpp elog-errors-HostEvent.hpp # Generate this header, don't export in a distro nodist_include_HEADERS = elog-gen.hpp +libphosphor_logging_FILES = \ + elog.cpp +libphosphor_loggingdir = ${libdir} +libphosphor_logging_LTLIBRARIES = libphosphor_logging.la +libphosphor_logging_la_SOURCES = $(libphosphor_logging_FILES) +libphosphor_logging_la_LDFLAGS = \ + $(SYSTEMD_LIBS) \ + $(SDBUSPLUS_LIBS) \ + -version-info 1:0:0 -shared +libphosphor_logging_la_CXXFLAGS = \ + $(SDBUSPLUS_CFLAGS) + # Application test which runs in obmc env (qemu, real hardware) bin_PROGRAMS = logging-test logging_test_SOURCES = logging_test.cpp diff --git a/elog.cpp b/elog.cpp new file mode 100644 index 0000000..2b452d4 --- /dev/null +++ b/elog.cpp @@ -0,0 +1,14 @@ +#include "elog.hpp" + +namespace phosphor +{ +namespace logging +{ + +void commit() +{ +} + +} // namespace logging +} // namespace phosphor + @@ -2,7 +2,7 @@ #include <tuple> #include <utility> -#include "elog-gen.hpp" +#include "log.hpp" namespace phosphor { @@ -87,16 +87,8 @@ public: /** @fn commit() * @brief Create an error log entry based on journal * entry with a specified MSG_ID - * @tparam E - Error log struct */ -template <typename E> -void commit() -{ - // TODO placeholder function call - // to call the new error log server to create - // an error log on the BMC flash - // dbus_commit(E.msgid); // call server -} +void commit(); /** @fn elog() * @brief Create a journal log entry based on predefined diff --git a/phosphor-logging.pc.in b/phosphor-logging.pc.in index 228246a..6ab5119 100644 --- a/phosphor-logging.pc.in +++ b/phosphor-logging.pc.in @@ -9,5 +9,5 @@ URL: https://github.com/openbmc/phosphor-logging Version: @VERSION@ Requires: @AX_PACKAGE_REQUIRES@ Requires.private: @AX_PACKAGE_REQUIRES_PRIVATE@ -Libs: +Libs: -L@libdir@ -lphosphor_logging Cflags: -I@includedir@ |