Skip to content

Commit 150607d

Browse files
Remove calls to openlog() (#422)
Co-authored-by: Isak Jakobsson <[email protected]>
1 parent 010ae9a commit 150607d

File tree

24 files changed

+1
-58
lines changed

24 files changed

+1
-58
lines changed

axevent/send_event/app/send_event.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,6 @@ gint main(void) {
190190
GMainLoop* main_loop = NULL;
191191
gdouble start_value = 0.0;
192192

193-
// Set up the user logging to syslog
194-
openlog(NULL, LOG_PID, LOG_USER);
195193
syslog(LOG_INFO, "Started logging from send event application");
196194

197195
// Event handler

axevent/subscribe_to_event/app/subscribe_to_event.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ int main(void) {
125125
guint subscription = 0;
126126
guint token = 1234;
127127

128-
// Set up the user logging to syslog
129-
openlog(NULL, LOG_PID, LOG_USER);
130128
syslog(LOG_INFO, "Started logging from subscribe event application");
131129

132130
// Event handler

axevent/subscribe_to_events/app/subscribe_to_events.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,6 @@ int main(void) {
513513
// Initialize main loop
514514
main_loop = g_main_loop_new(NULL, FALSE);
515515

516-
// Set up the user logging to syslog
517-
openlog(NULL, LOG_PID, LOG_USER);
518516
syslog(LOG_INFO, "Started logging from subscribe event application");
519517

520518
// Create an event handler

axoverlay/app/axoverlay.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,6 @@ int main(void) {
366366
gint camera_height = 0;
367367
gint camera_width = 0;
368368

369-
openlog(NULL, LOG_PID, LOG_USER);
370-
371369
// Create a glib main loop
372370
loop = g_main_loop_new(NULL, FALSE);
373371
g_unix_signal_add(SIGTERM, signal_handler, loop);

axparameter/app/axparameter.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,6 @@ int main(void) {
177177
GError* error = NULL;
178178
GMainLoop* loop = NULL;
179179

180-
openlog(APP_NAME, LOG_PID, LOG_USER);
181-
182180
// Passing in APP_NAME gives access to this application's parameters without qualifiers and
183181
// makes it possible to add or remove parameters.
184182
AXParameter* handle = ax_parameter_new(APP_NAME, &error);

axserialport/app/axserialport.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
/* AX Serial Port library. */
2424
#include <axsdk/axserialport.h>
2525

26-
#define APP_NAME "axserialport"
27-
2826
/**
2927
* MyConfigAndData contains application configuration and data.
3028
*/
@@ -175,7 +173,6 @@ int main(void) {
175173
g_unix_signal_add(SIGINT, signal_handler, loop);
176174

177175
/* Print some startup messages */
178-
openlog(APP_NAME, LOG_PID, LOG_LOCAL4);
179176
syslog(LOG_INFO, "Starting AxSerialPort application");
180177

181178
/* Create a configuration for the first port (port0) */

axstorage/app/axstorage.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
/* AX Storage library. */
2828
#include <axsdk/axstorage.h>
2929

30-
#define APP_NAME "axstorage"
31-
3230
/**
3331
* disk_item_t represents one storage device and its values.
3432
*/
@@ -377,7 +375,6 @@ gint main(void) {
377375
GMainLoop* loop = NULL;
378376
gint ret = EXIT_SUCCESS;
379377

380-
openlog(APP_NAME, LOG_PID, LOG_USER);
381378
syslog(LOG_INFO, "Start AXStorage application");
382379

383380
disks = ax_storage_list(&error);

bounding-box/app/bounding_box_example.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,6 @@ static void init_signals(void) {
231231
}
232232

233233
int main(void) {
234-
openlog(NULL, LOG_PID, LOG_USER);
235-
236234
init_signals();
237235

238236
for (bool once = true; running; once = false) {

curl-openssl/app/curl_openssl.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,6 @@ int main(void) {
114114
"/usr/local/packages/curl_openssl/localdata/www.example.com.txt",
115115
NULL};
116116

117-
// Start logging
118-
openlog(NULL, LOG_PID, LOG_USER);
119-
120117
// Log the curl and openssl library versions used in the code
121118
curl_version_info_data* ver = curl_version_info(CURLVERSION_NOW);
122119
syslog(LOG_INFO,

hello-world/app/hello_world.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@
3131
* This main function writes "hello_world" to the syslog.
3232
*/
3333
int main(void) {
34-
/* Open the syslog to report messages for "hello_world" */
35-
openlog("hello_world", LOG_PID | LOG_CONS, LOG_USER);
36-
3734
/* Choose between { LOG_INFO, LOG_CRIT, LOG_WARNING, LOG_ERR }*/
3835
syslog(LOG_INFO, "Hello World!");
3936
}

0 commit comments

Comments
 (0)