Vadim Yanitskiy has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11850 )

Change subject: mobile/app_mobile.c: use LOGP() instead of printf()/fprintf()
......................................................................

mobile/app_mobile.c: use LOGP() instead of printf()/fprintf()

Change-Id: I6af76afbaa34dde5ddfc31a65700030862442dba
---
M src/host/layer23/src/mobile/app_mobile.c
1 file changed, 8 insertions(+), 9 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, approved



diff --git a/src/host/layer23/src/mobile/app_mobile.c 
b/src/host/layer23/src/mobile/app_mobile.c
index af627c6..464cd55 100644
--- a/src/host/layer23/src/mobile/app_mobile.c
+++ b/src/host/layer23/src/mobile/app_mobile.c
@@ -452,20 +452,19 @@
        if (config_file != NULL) {
                rc = vty_read_config_file(config_file, &dummy_conn);
                if (rc < 0) {
-                       fprintf(stderr, "Failed to parse the config file:"
-                                       " '%s'\n", config_file);
-                       fprintf(stderr, "Please check or create config file"
-                                       " using: 'touch %s'\n", config_file);
-                       fprintf(stderr, "or use one from "
-                                       "'doc/examples/mobile/'\n");
+                       LOGP(DMOB, LOGL_FATAL, "Failed to parse the 
configuration "
+                               "file '%s'\n", config_file);
+                       LOGP(DMOB, LOGL_FATAL, "Please make sure the file "
+                               "'%s' exists, or use an example from "
+                               "'doc/examples/mobile/'\n", config_file);
                        return rc;
                }
-               printf("Using configuration from %s\n", config_file);
+               LOGP(DMOB, LOGL_INFO, "Using configuration from '%s'\n", 
config_file);
        }
        vty_reading = 0;
        rc = telnet_init_dynif(l23_ctx, NULL, vty_ip, vty_port);
        if (rc < 0) {
-               fprintf(stderr, "Cannot init VTY on %s port %u: %s\n",
+               LOGP(DMOB, LOGL_FATAL, "Cannot init VTY on %s port %u: %s\n",
                        vty_ip, vty_port, strerror(errno));
                return rc;
        }
@@ -477,7 +476,7 @@
        if (llist_empty(&ms_list)) {
                struct osmocom_ms *ms;

-               printf("No Mobile Station defined, creating: MS '1'\n");
+               LOGP(DMOB, LOGL_NOTICE, "No Mobile Station defined, creating: 
MS '1'\n");
                ms = mobile_new("1");
                if (!ms)
                        return -1;

--
To view, visit https://gerrit.osmocom.org/11850
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6af76afbaa34dde5ddfc31a65700030862442dba
Gerrit-Change-Number: 11850
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <[email protected]>
Gerrit-Reviewer: Vadim Yanitskiy <[email protected]>

Reply via email to