You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by bp...@apache.org on 2014/09/05 20:28:23 UTC
svn commit: r1622754 - in /celix/trunk: cmake/ log_writer/
log_writer/log_writer/ log_writer/log_writer/private/
log_writer/log_writer/private/include/ log_writer/log_writer/private/src/
log_writer/log_writer_stdout/ log_writer/log_writer_stdout/privat...
Author: bpetri
Date: Fri Sep 5 18:28:23 2014
New Revision: 1622754
URL: http://svn.apache.org/r1622754
Log:
CELIX-149
refactoring of log_writer to allow a separate syslog bundle
Added:
celix/trunk/cmake/FindSyslog.cmake
celix/trunk/log_writer/log_writer/
celix/trunk/log_writer/log_writer/private/
celix/trunk/log_writer/log_writer/private/include/
celix/trunk/log_writer/log_writer/private/include/log_writer.h
celix/trunk/log_writer/log_writer/private/src/
celix/trunk/log_writer/log_writer/private/src/log_writer.c
celix/trunk/log_writer/log_writer/private/src/log_writer_activator.c
celix/trunk/log_writer/log_writer_stdout/
celix/trunk/log_writer/log_writer_stdout/CMakeLists.txt
celix/trunk/log_writer/log_writer_stdout/private/
celix/trunk/log_writer/log_writer_stdout/private/src/
celix/trunk/log_writer/log_writer_stdout/private/src/log_writer_stdout.c
celix/trunk/log_writer/log_writer_syslog/
celix/trunk/log_writer/log_writer_syslog/CMakeLists.txt
celix/trunk/log_writer/log_writer_syslog/private/
celix/trunk/log_writer/log_writer_syslog/private/src/
celix/trunk/log_writer/log_writer_syslog/private/src/log_writer_syslog.c
Removed:
celix/trunk/log_writer/private/
Modified:
celix/trunk/log_writer/CMakeLists.txt
Added: celix/trunk/cmake/FindSyslog.cmake
URL: http://svn.apache.org/viewvc/celix/trunk/cmake/FindSyslog.cmake?rev=1622754&view=auto
==============================================================================
--- celix/trunk/cmake/FindSyslog.cmake (added)
+++ celix/trunk/cmake/FindSyslog.cmake Fri Sep 5 18:28:23 2014
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+find_path(SYSLOG_INCLUDE_DIR syslog.h /usr/include)
+
+include(FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args(Syslog DEFAULT_MSG
+ SYSLOG_INCLUDE_DIR)
+
+mark_as_advanced(SYSLOG_INCLUDE_DIR)
Modified: celix/trunk/log_writer/CMakeLists.txt
URL: http://svn.apache.org/viewvc/celix/trunk/log_writer/CMakeLists.txt?rev=1622754&r1=1622753&r2=1622754&view=diff
==============================================================================
--- celix/trunk/log_writer/CMakeLists.txt (original)
+++ celix/trunk/log_writer/CMakeLists.txt Fri Sep 5 18:28:23 2014
@@ -15,24 +15,8 @@
# specific language governing permissions and limitations
# under the License.
-celix_subproject(LOG_WRITER "Option to enable building the Log Writer bundle" "OFF" DEPS FRAMEWORK LOG_SERVICE)
+celix_subproject(LOG_WRITER "Option to enable building the Log Writer bundles" "OFF" DEPS FRAMEWORK LOG_SERVICE)
if (LOG_WRITER)
-
- SET_HEADER(BUNDLE_VERSION "1.0.0.incubating")
- SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_log_writer")
- SET_HEADERS("Bundle-Name: Apache Celix Log Writer")
-
- bundle(log_writer SOURCES
- private/src/log_writer_activator
- private/src/log_writer
-
- private/include/log_writer.h
- )
-
- install_bundle(log_writer)
-
- include_directories("private/include")
- include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
- include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
- target_link_libraries(log_writer celix_framework)
-endif (LOG_WRITER)
\ No newline at end of file
+ add_subdirectory(log_writer_stdout)
+ add_subdirectory(log_writer_syslog)
+endif (LOG_WRITER)
Added: celix/trunk/log_writer/log_writer/private/include/log_writer.h
URL: http://svn.apache.org/viewvc/celix/trunk/log_writer/log_writer/private/include/log_writer.h?rev=1622754&view=auto
==============================================================================
--- celix/trunk/log_writer/log_writer/private/include/log_writer.h (added)
+++ celix/trunk/log_writer/log_writer/private/include/log_writer.h Fri Sep 5 18:28:23 2014
@@ -0,0 +1,53 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements. See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership. The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * low_writer.h
+ *
+ * \date Jul 4, 2011
+ * \author <a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project Team</a>
+ * \copyright Apache License, Version 2.0
+ */
+
+#ifndef LOG_WRITER_H_
+#define LOG_WRITER_H_
+
+#include "log_reader_service.h"
+
+#include "service_tracker.h"
+
+struct log_writer {
+ log_reader_service_pt logReader;
+ log_listener_pt logListener;
+ apr_pool_t *pool;
+ bundle_context_pt context;
+ service_tracker_pt tracker;
+};
+
+typedef struct log_writer *log_writer_pt;
+
+celix_status_t logWriter_create(apr_pool_t *pool, bundle_context_pt context, log_writer_pt *writer);
+celix_status_t logWriter_start(log_writer_pt writer);
+celix_status_t logWriter_stop(log_writer_pt writer);
+
+celix_status_t logWriter_addingServ(void * handle, service_reference_pt ref, void **service);
+celix_status_t logWriter_addedServ(void * handle, service_reference_pt ref, void * service);
+celix_status_t logWriter_modifiedServ(void * handle, service_reference_pt ref, void * service);
+celix_status_t logWriter_removedServ(void * handle, service_reference_pt ref, void * service);
+
+#endif /* LOG_WRITER_H_ */
Added: celix/trunk/log_writer/log_writer/private/src/log_writer.c
URL: http://svn.apache.org/viewvc/celix/trunk/log_writer/log_writer/private/src/log_writer.c?rev=1622754&view=auto
==============================================================================
--- celix/trunk/log_writer/log_writer/private/src/log_writer.c (added)
+++ celix/trunk/log_writer/log_writer/private/src/log_writer.c Fri Sep 5 18:28:23 2014
@@ -0,0 +1,107 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements. See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership. The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * tracker.c
+ *
+ * \date Mar 7, 2011
+ * \author <a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project Team</a>
+ * \copyright Apache License, Version 2.0
+ */
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "celix_errno.h"
+#include "celixbool.h"
+
+#include "log_writer.h"
+#include "log_listener.h"
+#include "module.h"
+#include "bundle.h"
+
+celix_status_t logWriter_create(apr_pool_t *pool, bundle_context_pt context, log_writer_pt *writer) {
+ celix_status_t status = CELIX_SUCCESS;
+
+ apr_pool_t *mypool;
+ apr_pool_create(&mypool, pool);
+
+ *writer = apr_pcalloc(mypool, sizeof(**writer));
+ (*writer)->logListener = apr_pcalloc(mypool, sizeof(*(*writer)->logListener));
+ (*writer)->logListener->handle = *writer;
+ (*writer)->logListener->logged = logListener_logged;
+ (*writer)->logReader = NULL;
+ (*writer)->pool = mypool;
+ (*writer)->context = context;
+ (*writer)->tracker = NULL;
+
+ return status;
+}
+
+celix_status_t logWriter_start(log_writer_pt writer) {
+ celix_status_t status = CELIX_SUCCESS;
+
+ service_tracker_customizer_pt cust = NULL;
+ service_tracker_pt tracker = NULL;
+
+ status = serviceTrackerCustomizer_create(writer, logWriter_addingServ, logWriter_addedServ, logWriter_modifiedServ, logWriter_removedServ, &cust);
+ if (status == CELIX_SUCCESS) {
+ status = serviceTracker_create(writer->context, (char *) OSGI_LOGSERVICE_READER_SERVICE_NAME, cust, &tracker);
+ if (status == CELIX_SUCCESS) {
+ writer->tracker = tracker;
+ status = serviceTracker_open(tracker);
+ }
+ }
+
+ return status;
+}
+
+celix_status_t logWriter_stop(log_writer_pt writer) {
+ return serviceTracker_close(writer->tracker);
+}
+
+celix_status_t logWriter_addingServ(void * handle, service_reference_pt ref, void **service) {
+ log_writer_pt writer = (log_writer_pt) handle;
+ bundleContext_getService(writer->context, ref, service);
+ return CELIX_SUCCESS;
+}
+
+celix_status_t logWriter_addedServ(void * handle, service_reference_pt ref, void * service) {
+ log_writer_pt writer = (log_writer_pt) handle;
+
+ // Add this writer to each log reader service found
+ if (service != NULL) {
+ ((log_reader_service_pt) service)->addLogListener(((log_reader_service_pt) service)->reader, writer->logListener);
+ }
+
+ return CELIX_SUCCESS;
+}
+
+celix_status_t logWriter_modifiedServ(void * handle, service_reference_pt ref, void * service) {
+ log_writer_pt writer = (log_writer_pt) handle;
+ return CELIX_SUCCESS;
+}
+
+celix_status_t logWriter_removedServ(void * handle, service_reference_pt ref, void * service) {
+ log_writer_pt writer = (log_writer_pt) handle;
+
+ if (service != NULL) {
+ ((log_reader_service_pt) service)->removeLogListener(((log_reader_service_pt) service)->reader, writer->logListener);
+ }
+
+ return CELIX_SUCCESS;
+}
Added: celix/trunk/log_writer/log_writer/private/src/log_writer_activator.c
URL: http://svn.apache.org/viewvc/celix/trunk/log_writer/log_writer/private/src/log_writer_activator.c?rev=1622754&view=auto
==============================================================================
--- celix/trunk/log_writer/log_writer/private/src/log_writer_activator.c (added)
+++ celix/trunk/log_writer/log_writer/private/src/log_writer_activator.c Fri Sep 5 18:28:23 2014
@@ -0,0 +1,56 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements. See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership. The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * activator.c
+ *
+ * \date Oct 1, 2013
+ * \author <a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project Team</a>
+ * \copyright Apache License, Version 2.0
+ */
+
+#include "log_writer.h"
+
+#include "bundle_activator.h"
+
+celix_status_t bundleActivator_create(bundle_context_pt context, void **userData) {
+ apr_pool_t *pool;
+ log_writer_pt writer = NULL;
+
+ bundleContext_getMemoryPool(context, &pool);
+
+ logWriter_create(pool, context, &writer);
+
+ *userData = writer;
+
+ return CELIX_SUCCESS;
+}
+
+celix_status_t bundleActivator_start(void * userData, bundle_context_pt context) {
+ logWriter_start(userData);
+ return CELIX_SUCCESS;
+}
+
+celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) {
+ logWriter_stop(userData);
+ return CELIX_SUCCESS;
+}
+
+celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt context) {
+ return CELIX_SUCCESS;
+}
Added: celix/trunk/log_writer/log_writer_stdout/CMakeLists.txt
URL: http://svn.apache.org/viewvc/celix/trunk/log_writer/log_writer_stdout/CMakeLists.txt?rev=1622754&view=auto
==============================================================================
--- celix/trunk/log_writer/log_writer_stdout/CMakeLists.txt (added)
+++ celix/trunk/log_writer/log_writer_stdout/CMakeLists.txt Fri Sep 5 18:28:23 2014
@@ -0,0 +1,36 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_log_writer")
+SET_HEADERS("Bundle-Name: Apache Celix Log Writer")
+SET_HEADER(BUNDLE_VERSION "1.0.0")
+
+bundle(log_writer SOURCES
+ ${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/src/log_writer_activator
+ ${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/src/log_writer
+ ${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/include/log_writer.h
+
+ private/src/log_writer_stdout
+)
+
+install_bundle(log_writer)
+
+target_link_libraries(log_writer celix_framework)
+
+include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
+include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
+include_directories("${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/include")
Added: celix/trunk/log_writer/log_writer_stdout/private/src/log_writer_stdout.c
URL: http://svn.apache.org/viewvc/celix/trunk/log_writer/log_writer_stdout/private/src/log_writer_stdout.c?rev=1622754&view=auto
==============================================================================
--- celix/trunk/log_writer/log_writer_stdout/private/src/log_writer_stdout.c (added)
+++ celix/trunk/log_writer/log_writer_stdout/private/src/log_writer_stdout.c Fri Sep 5 18:28:23 2014
@@ -0,0 +1,53 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements. See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership. The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * log_writer_stdout.c
+ *
+ * \date Mar 7, 2011
+ * \author <a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project Team</a>
+ * \copyright Apache License, Version 2.0
+ */
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "celix_errno.h"
+#include "celixbool.h"
+
+#include "log_writer.h"
+#include "log_listener.h"
+
+#include "module.h"
+#include "bundle.h"
+
+celix_status_t logListener_logged(log_listener_pt listener, log_entry_pt entry) {
+ celix_status_t status = CELIX_SUCCESS;
+ module_pt module = NULL;
+ char *sName = NULL;
+
+ status = bundle_getCurrentModule(entry->bundle, &module);
+ if (status == CELIX_SUCCESS) {
+ status = module_getSymbolicName(module, &sName);
+ if (status == CELIX_SUCCESS) {
+ printf("LogWriter: %s from %s\n", entry->message, sName);
+ }
+ }
+
+ return status;
+}
+
Added: celix/trunk/log_writer/log_writer_syslog/CMakeLists.txt
URL: http://svn.apache.org/viewvc/celix/trunk/log_writer/log_writer_syslog/CMakeLists.txt?rev=1622754&view=auto
==============================================================================
--- celix/trunk/log_writer/log_writer_syslog/CMakeLists.txt (added)
+++ celix/trunk/log_writer/log_writer_syslog/CMakeLists.txt Fri Sep 5 18:28:23 2014
@@ -0,0 +1,40 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+celix_subproject(LOG_WRITER_SYSLOG "Option to enable building the Syslog Writer" OFF DEPS FRAMEWORK LOG_SERVICE)
+if (LOG_WRITER_SYSLOG)
+ find_package(Syslog REQUIRED)
+
+ SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_log_writer_syslog")
+ SET_HEADERS("Bundle-Name: Apache Celix Log Writer Syslog")
+ SET_HEADER(BUNDLE_VERSION "1.0.0")
+
+ bundle(log_writer_syslog SOURCES
+ ${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/src/log_writer_activator
+ ${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/src/log_writer
+ ${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/include/log_writer.h
+
+ private/src/log_writer_syslog
+ )
+
+ install_bundle(log_writer_syslog)
+
+ target_link_libraries(log_writer_syslog celix_framework)
+
+ include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
+ include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
+ include_directories("${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/include")
+endif (LOG_WRITER_SYSLOG)
Added: celix/trunk/log_writer/log_writer_syslog/private/src/log_writer_syslog.c
URL: http://svn.apache.org/viewvc/celix/trunk/log_writer/log_writer_syslog/private/src/log_writer_syslog.c?rev=1622754&view=auto
==============================================================================
--- celix/trunk/log_writer/log_writer_syslog/private/src/log_writer_syslog.c (added)
+++ celix/trunk/log_writer/log_writer_syslog/private/src/log_writer_syslog.c Fri Sep 5 18:28:23 2014
@@ -0,0 +1,85 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements. See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership. The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * log_writer_syslog.c
+ *
+ * \date Mar 7, 2011
+ * \author <a href="mailto:celix-dev@incubator.apache.org">Apache Celix Project Team</a>
+ * \copyright Apache License, Version 2.0
+ */
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "celix_errno.h"
+#include "celixbool.h"
+
+#include "log_writer.h"
+#include "log_listener.h"
+
+#include "module.h"
+#include "bundle.h"
+
+#include <syslog.h>
+
+celix_status_t logListener_logged(log_listener_pt listener, log_entry_pt entry)
+{
+ celix_status_t status = CELIX_SUCCESS;
+ module_pt module = NULL;
+ char *sName = NULL;
+
+ status = bundle_getCurrentModule(entry->bundle, &module);
+ if (status == CELIX_SUCCESS) {
+ status = module_getSymbolicName(module, &sName);
+ if (status == CELIX_SUCCESS) {
+
+ int sysLogLvl = -1;
+ int strLen_message = 0;
+ char* sysLog_message = NULL;
+
+ switch(entry->level)
+ {
+ case 0x00000001: /*OSGI_LOGSERVICE_ERROR */
+ sysLogLvl = LOG_MAKEPRI(LOG_FAC(LOG_USER), LOG_ERR);
+ break;
+ case 0x00000002: /* OSGI_LOGSERVICE_WARNING */
+ sysLogLvl = LOG_MAKEPRI(LOG_FAC(LOG_USER), LOG_WARNING);
+ break;
+ case 0x00000003: /* OSGI_LOGSERVICE_INFO */
+ sysLogLvl = LOG_MAKEPRI(LOG_FAC(LOG_USER), LOG_INFO);
+ break;
+ case 0x00000004: /* OSGI_LOGSERVICE_DEBUG */
+ sysLogLvl = LOG_MAKEPRI(LOG_FAC(LOG_USER), LOG_DEBUG);
+ break;
+ default: /* OSGI_LOGSERVICE_INFO */
+ sysLogLvl = LOG_MAKEPRI(LOG_FAC(LOG_USER), LOG_INFO);
+ break;
+ }
+
+ strLen_message = strlen(sName) + strlen(entry->message) + 6;//"[]: (\n)" -> 6
+ sysLog_message = calloc(strLen_message, sizeof(char));
+ snprintf(sysLog_message, strLen_message, "[%s]: %s", sName, entry->message);
+
+ syslog(sysLogLvl, sysLog_message);
+
+ free(sysLog_message);
+ }
+ }
+
+ return status;
+}