You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2019/11/22 19:53:14 UTC

[qpid-proton] branch master updated: PROTON-2131: No longer allow creation of independent pn_logger_t instances - You always get a logger that is embedded in something else in the API eg a transport, or the default logger.

This is an automated email from the ASF dual-hosted git repository.

astitcher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/master by this push:
     new 43340a6  PROTON-2131: No longer allow creation of independent pn_logger_t instances - You always get a logger that is embedded in something else in the API   eg a transport, or the default logger.
43340a6 is described below

commit 43340a69f81a09966b882c5c26baf2966af46309
Author: Andrew Stitcher <as...@apache.org>
AuthorDate: Fri Nov 22 14:45:31 2019 -0500

    PROTON-2131: No longer allow creation of independent pn_logger_t instances
    - You always get a logger that is embedded in something else in the API
      eg a transport, or the default logger.
---
 c/include/proton/logger.h | 16 ----------------
 c/src/core/logger.c       | 14 --------------
 2 files changed, 30 deletions(-)

diff --git a/c/include/proton/logger.h b/c/include/proton/logger.h
index f19d175..35f330b 100644
--- a/c/include/proton/logger.h
+++ b/c/include/proton/logger.h
@@ -132,22 +132,6 @@ typedef void (*pn_log_sink_t)(intptr_t sink_context, pn_log_subsystem_t subsyste
 PN_EXTERN pn_logger_t *pn_default_logger(void);
 
 /**
- * Create a new logger
- *
- * Note that loggers must be deallocated with @ref pn_logger_free after use.
- *
- * @return a newly constructed logger
- */
-PN_EXTERN pn_logger_t *pn_logger(void);
-
-/**
- * Free an existing logger
- *
- * @param[in] logger the logger to free
- */
-PN_EXTERN void pn_logger_free(pn_logger_t *logger);
-
-/**
  * Get a human readable name for a logger severity
  *
  * @param[in] level the logging level
diff --git a/c/src/core/logger.c b/c/src/core/logger.c
index b414150..45743ef 100644
--- a/c/src/core/logger.c
+++ b/c/src/core/logger.c
@@ -145,20 +145,6 @@ const char *pn_logger_subsystem_name(pn_log_subsystem_t subsystem)
   return "UNKNOWN";
 }
 
-pn_logger_t *pn_logger(void)
-{
-  pn_logger_t *l = (pn_logger_t*) malloc(sizeof(pn_logger_t));
-  pni_logger_init(l);
-  return l;
-}
-
-void pn_logger_free(pn_logger_t *logger)
-{
-  if (!logger) return;
-  pni_logger_fini(logger);
-  free(logger);
-}
-
 pn_logger_t *pn_default_logger(void)
 {
   return &the_default_logger;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org