diff --git a/app/dmbeat.f90 b/app/dmbeat.f90 index 16f9923..bb2dbf0 100644 --- a/app/dmbeat.f90 +++ b/app/dmbeat.f90 @@ -49,7 +49,7 @@ program dmbeat if (dm_is_error(rc)) call dm_stop(STOP_FAILURE) ! Initialise logger. - logger => dm_logger_get() + logger => dm_logger_get_default() call logger%configure(name = app%logger, & node_id = app%node, & source = app%name, & diff --git a/app/dmbot.f90 b/app/dmbot.f90 index ebe1c84..a5ab9e2 100644 --- a/app/dmbot.f90 +++ b/app/dmbot.f90 @@ -65,7 +65,7 @@ program dmbot if (dm_is_error(rc)) call dm_stop(STOP_FAILURE) ! Initialise logger. - logger => dm_logger_get() + logger => dm_logger_get_default() call logger%configure(name = app%logger, & ! Name of logger process. node_id = app%node, & ! Node id. source = app%name, & ! Log source. diff --git a/app/dmdb.f90 b/app/dmdb.f90 index 6e50331..e34dd9c 100644 --- a/app/dmdb.f90 +++ b/app/dmdb.f90 @@ -46,7 +46,7 @@ program dmdb if (dm_is_error(rc)) call dm_stop(STOP_FAILURE) ! Initialise logger. - logger => dm_logger_get() + logger => dm_logger_get_default() call logger%configure(name = app%logger, & node_id = app%node, & source = app%name, & diff --git a/app/dmfs.f90 b/app/dmfs.f90 index ea60412..cab033c 100644 --- a/app/dmfs.f90 +++ b/app/dmfs.f90 @@ -48,7 +48,7 @@ program dmfs if (dm_is_error(rc)) call dm_stop(STOP_FAILURE) ! Initialise logger. - logger => dm_logger_get() + logger => dm_logger_get_default() call logger%configure(name = app%logger, & node_id = app%node, & source = app%name, & diff --git a/app/dmgrc.f90 b/app/dmgrc.f90 index 10a3a28..047a2b6 100644 --- a/app/dmgrc.f90 +++ b/app/dmgrc.f90 @@ -47,7 +47,7 @@ program dmgrc if (dm_is_error(rc)) call dm_stop(STOP_FAILURE) ! Initialise logger. - logger => dm_logger_get() + logger => dm_logger_get_default() call logger%configure(name = app%logger, & node_id = app%node, & source = app%name, & diff --git a/app/dmlog.f90 b/app/dmlog.f90 index 1099e5a..3ce44f3 100644 --- a/app/dmlog.f90 +++ b/app/dmlog.f90 @@ -32,7 +32,7 @@ program dmlog if (dm_is_error(rc)) call dm_stop(STOP_FAILURE) ! Initialise logger. - logger => dm_logger_get() + logger => dm_logger_get_default() call logger%configure(name=app%logger, ipc=.true., verbose=app%verbose) ! Prepare and send log. diff --git a/app/dmlogger.f90 b/app/dmlogger.f90 index 1fd173d..032c7bc 100644 --- a/app/dmlogger.f90 +++ b/app/dmlogger.f90 @@ -44,7 +44,7 @@ program dmlogger init_block: block ! Initialise logger. - logger => dm_logger_get() + logger => dm_logger_get_default() call logger%configure(name = app%name, & ! Name of global logger. node_id = app%node, & ! Sensor node id. source = app%name, & ! Application name. diff --git a/app/dmlua.f90 b/app/dmlua.f90 index f29c0bf..d8db3d8 100644 --- a/app/dmlua.f90 +++ b/app/dmlua.f90 @@ -44,7 +44,7 @@ program dmlua if (dm_is_error(rc)) call dm_stop(STOP_FAILURE) ! Initialise logger. - logger => dm_logger_get() + logger => dm_logger_get_default() call logger%configure(name = app%logger, & node_id = app%node, & source = app%name, & diff --git a/app/dmpipe.f90 b/app/dmpipe.f90 index d837f87..be5f8c3 100644 --- a/app/dmpipe.f90 +++ b/app/dmpipe.f90 @@ -51,7 +51,7 @@ program dmpipe if (dm_is_error(rc)) call dm_stop(STOP_FAILURE) ! Initialise logger. - logger => dm_logger_get() + logger => dm_logger_get_default() call logger%configure(name = app%logger, & node_id = app%node, & source = app%name, & diff --git a/app/dmrecv.f90 b/app/dmrecv.f90 index 40ec05b..e893a50 100644 --- a/app/dmrecv.f90 +++ b/app/dmrecv.f90 @@ -61,7 +61,7 @@ program dmrecv if (dm_is_error(rc)) call dm_stop(STOP_FAILURE) ! Initialise logger. - logger => dm_logger_get() + logger => dm_logger_get_default() call logger%configure(name = app%logger, & node_id = app%node, & source = app%name, & diff --git a/app/dmsend.f90 b/app/dmsend.f90 index 4bb82d8..7878e06 100644 --- a/app/dmsend.f90 +++ b/app/dmsend.f90 @@ -45,7 +45,7 @@ program dmsend if (dm_is_error(rc)) call dm_stop(STOP_FAILURE) ! Initialise logger. - logger => dm_logger_get() + logger => dm_logger_get_default() call logger%configure(name = app%logger, & node_id = app%node, & source = app%name, & diff --git a/app/dmserial.f90 b/app/dmserial.f90 index efd790c..2ff9ec4 100644 --- a/app/dmserial.f90 +++ b/app/dmserial.f90 @@ -68,7 +68,7 @@ program dmserial if (dm_is_error(rc)) call dm_stop(STOP_FAILURE) ! Initialise logger. - logger => dm_logger_get() + logger => dm_logger_get_default() call logger%configure(name = app%logger, & node_id = app%node, & source = app%name, & diff --git a/app/dmsync.f90 b/app/dmsync.f90 index 0d74cbb..b7b5d6d 100644 --- a/app/dmsync.f90 +++ b/app/dmsync.f90 @@ -59,7 +59,7 @@ program dmsync if (dm_is_error(rc)) call dm_stop(STOP_FAILURE) ! Initialise logger. - logger => dm_logger_get() + logger => dm_logger_get_default() call logger%configure(name = app%logger, & ! Name of logger process. node_id = app%node, & ! Node id. source = app%name, & ! Log source. diff --git a/src/dm_jabber.f90 b/src/dm_jabber.f90 index 45964d1..59ceccd 100644 --- a/src/dm_jabber.f90 +++ b/src/dm_jabber.f90 @@ -342,7 +342,7 @@ integer function dm_jabber_create(jabber, log_level) result(rc) ! Set log level. ll = JABBER_LL_NONE if (present(log_level)) ll = log_level - if (ll < JABBER_LL_NONE .or. ll> JABBER_LL_ERROR) return + if (ll < JABBER_LL_NONE .or. ll > JABBER_LL_ERROR) return ! Enable logging. if (ll /= JABBER_LL_NONE) log = xmpp_get_default_logger(ll) diff --git a/src/dm_logger.f90 b/src/dm_logger.f90 index dad37fa..147d574 100644 --- a/src/dm_logger.f90 +++ b/src/dm_logger.f90 @@ -12,7 +12,7 @@ module dm_logger !! ```fortran !! class(logger_class), pointer :: logger !! - !! logger => dm_logger_get() + !! logger => dm_logger_get_default() !! call logger%configure(name='dmlogger', ipc=.true., verbose=.true.) !! call logger%error('log message') !! ``` @@ -74,7 +74,7 @@ module dm_logger class(logger_class), allocatable, target, save :: MODULE_LOGGER ! Public procedures. - public :: dm_logger_get + public :: dm_logger_get_default ! Private procedures. private :: logger_configure @@ -93,7 +93,7 @@ module dm_logger ! ****************************************************************** ! PUBLIC PROCEDURES. ! ****************************************************************** - function dm_logger_get() result(logger) + function dm_logger_get_default() result(logger) !! Returns pointer to global logger. The function allocates the logger !! if it does not exist yet. class(logger_class), pointer :: logger !! Pointer to logger object. @@ -108,7 +108,7 @@ function dm_logger_get() result(logger) end if logger => MODULE_LOGGER - end function dm_logger_get + end function dm_logger_get_default ! ****************************************************************** ! PRIVATE CLASS METHODS. diff --git a/src/dm_mqueue_util.f90 b/src/dm_mqueue_util.f90 index bacda49..15903e0 100644 --- a/src/dm_mqueue_util.f90 +++ b/src/dm_mqueue_util.f90 @@ -63,7 +63,7 @@ integer function mqueue_forward_observ(observ, name, blocking, allow_self, verbo ! Enable logging. verbose_ = .true. if (present(verbose)) verbose_ = verbose - if (verbose_) logger => dm_logger_get() + if (verbose_) logger => dm_logger_get_default() do ! Increase the receiver index. diff --git a/test/dmtestlogger.f90 b/test/dmtestlogger.f90 index 72a9182..0770c1c 100644 --- a/test/dmtestlogger.f90 +++ b/test/dmtestlogger.f90 @@ -60,7 +60,7 @@ logical function test01() result(stat) log1%error = TEST_ERROR print *, 'Initialising logger ...' - logger => dm_logger_get() + logger => dm_logger_get_default() call logger%configure(name=LOGGER_NAME, debug=.true., ipc=.true., no_color=.true.) print *, 'Opening log message queue ...'