dbcsr_get_default_logger Function

public function dbcsr_get_default_logger() result(res)

returns the default logger

Arguments

None

Return Value type(dbcsr_logger_type),POINTER


Contents


Source Code

   FUNCTION dbcsr_get_default_logger() RESULT(res)
      !! returns the default logger
      !! @note
      !! initializes the default loggers if necessary

      TYPE(dbcsr_logger_type), POINTER                   :: res

      IF (.NOT. stack_pointer > 0) THEN
         CALL dbcsr_abort(__LOCATION__, "dbcsr_log_handling:dbcsr_get_default_logger"// &
                          "default logger not yet initialized (CALL dbcsr_init_default_logger)")
      END IF
      res => default_logger_stack(stack_pointer)%dbcsr_default_logger
      IF (.NOT. ASSOCIATED(res)) THEN
         CALL dbcsr_abort(__LOCATION__, "dbcsr_log_handling:dbcsr_get_default_logger"// &
                          "default logger is null (released too much ?)")
      END IF
   END FUNCTION dbcsr_get_default_logger