diff mbox series

log: deduce log type from filename

Message ID 20210409124334.24479-1-david.marchand@redhat.com (mailing list archive)
State Superseded
Delegated to: Thomas Monjalon
Headers show
Series log: deduce log type from filename | expand

Checks

Context Check Description
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/travis-robot success travis build: passed
ci/github-robot success github build: passed
ci/checkpatch warning coding style issues

Commit Message

David Marchand April 9, 2021, 12:43 p.m. UTC
Let's try to enforce the convention where drivers use a pmd. logtype
with their class reflected in it and libraries use a lib. logtype.

RTE_LOG_REGISTER now interprets the log type name:
- if none or a name starting with a . is passed, then the default logtype
  is used as a prefix,
- else the name is used as is to deal with components that do not comply
  with the current convention,

Note: achieved with below command (+ manual edit on crypto/virtio,
compress/mlx5 and regex/mlx5).
$ git grep -l RTE_LOG_REGISTER drivers/ |
  while read file; do
    pattern=${file##drivers/};
    class=${pattern%%/*};
    pattern=${pattern#$class/};
    pattern=pmd.$class.${pattern%%/*};
    sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\(\|\..*\),/RTE_LOG_REGISTER(\1, \2,/' $file;
  done

$ git grep -l RTE_LOG_REGISTER lib/ |
  while read file; do
    pattern=${file##lib/librte_};
    pattern=lib.${pattern%%/*};
    sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\(\|\..*\),/RTE_LOG_REGISTER(\1, \2,/' $file;
  done

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
This is an alternative to the devtools check I had proposed [1].
This can be seen as a RFC, but if people are happy with it, I don't see
much to add.

1: https://patchwork.dpdk.org/project/dpdk/list/?series=15796

---
 drivers/common/dpaax/dpaax_iova_table.c       |  2 +-
 drivers/common/iavf/iavf_impl.c               |  2 +-
 drivers/common/mlx5/mlx5_common.c             |  2 +-
 drivers/compress/isal/isal_compress_pmd.c     |  2 +-
 drivers/compress/mlx5/mlx5_compress.c         |  3 +-
 drivers/compress/octeontx/otx_zip_pmd.c       |  2 +-
 drivers/compress/zlib/zlib_pmd.c              |  2 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c      |  2 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |  2 +-
 drivers/crypto/armv8/rte_armv8_pmd.c          |  2 +-
 drivers/crypto/bcmfs/bcmfs_logs.c             |  4 +-
 drivers/crypto/kasumi/rte_kasumi_pmd.c        |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd.c           |  2 +-
 drivers/crypto/nitrox/nitrox_logs.c           |  2 +-
 drivers/crypto/null/null_crypto_pmd.c         |  2 +-
 drivers/crypto/octeontx/otx_cryptodev.c       |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev.c     |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c      |  2 +-
 .../scheduler/rte_cryptodev_scheduler.c       |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd.c        |  2 +-
 drivers/crypto/virtio/virtio_cryptodev.c      | 12 +++---
 drivers/crypto/zuc/rte_zuc_pmd.c              |  2 +-
 drivers/event/dlb/dlb.c                       |  2 +-
 drivers/event/dlb2/dlb2.c                     |  2 +-
 drivers/event/dpaa/dpaa_eventdev.c            |  2 +-
 drivers/event/dpaa2/dpaa2_eventdev.c          |  2 +-
 drivers/event/octeontx/ssovf_evdev.c          |  2 +-
 drivers/event/octeontx/timvf_evdev.c          |  2 +-
 drivers/event/opdl/opdl_evdev.c               |  2 +-
 drivers/event/sw/sw_evdev.c                   |  2 +-
 drivers/mempool/octeontx/octeontx_fpavf.c     |  2 +-
 drivers/net/af_packet/rte_eth_af_packet.c     |  2 +-
 drivers/net/af_xdp/rte_eth_af_xdp.c           |  2 +-
 drivers/net/ark/ark_ethdev.c                  |  2 +-
 drivers/net/atlantic/atl_ethdev.c             |  4 +-
 drivers/net/avp/avp_ethdev.c                  |  2 +-
 drivers/net/axgbe/axgbe_ethdev.c              |  4 +-
 drivers/net/bnx2x/bnx2x_ethdev.c              |  4 +-
 drivers/net/bnxt/bnxt_ethdev.c                |  2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c        |  2 +-
 drivers/net/cxgbe/cxgbe_ethdev.c              |  4 +-
 drivers/net/dpaa/dpaa_ethdev.c                |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c              |  2 +-
 drivers/net/e1000/e1000_logs.c                | 10 ++---
 drivers/net/ena/ena_ethdev.c                  | 12 +++---
 drivers/net/enetc/enetc_ethdev.c              |  2 +-
 drivers/net/enic/enic_ethdev.c                |  2 +-
 drivers/net/failsafe/failsafe.c               |  2 +-
 drivers/net/fm10k/fm10k_ethdev.c              | 10 ++---
 drivers/net/hinic/hinic_pmd_ethdev.c          |  2 +-
 drivers/net/hns3/hns3_ethdev.c                |  4 +-
 drivers/net/i40e/i40e_ethdev.c                | 10 ++---
 drivers/net/iavf/iavf_ethdev.c                | 10 ++---
 drivers/net/ice/ice_ethdev.c                  | 10 ++---
 drivers/net/igc/igc_logs.c                    |  4 +-
 drivers/net/ionic/ionic_ethdev.c              |  2 +-
 drivers/net/ipn3ke/ipn3ke_ethdev.c            |  2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c              | 10 ++---
 drivers/net/kni/rte_eth_kni.c                 |  2 +-
 drivers/net/liquidio/lio_ethdev.c             |  4 +-
 drivers/net/memif/rte_eth_memif.c             |  2 +-
 drivers/net/mlx4/mlx4.c                       |  2 +-
 drivers/net/mlx5/mlx5.c                       |  2 +-
 drivers/net/mvneta/mvneta_ethdev.c            |  2 +-
 drivers/net/mvpp2/mrvl_ethdev.c               |  2 +-
 drivers/net/netvsc/hn_ethdev.c                |  4 +-
 drivers/net/nfp/nfp_net.c                     |  4 +-
 drivers/net/null/rte_eth_null.c               |  2 +-
 drivers/net/octeontx/octeontx_ethdev.c        |  6 +--
 drivers/net/octeontx_ep/otx_ep_ethdev.c       |  2 +-
 drivers/net/pcap/rte_eth_pcap.c               |  2 +-
 drivers/net/pfe/pfe_ethdev.c                  |  2 +-
 drivers/net/qede/qede_ethdev.c                |  4 +-
 drivers/net/ring/rte_eth_ring.c               |  2 +-
 drivers/net/softnic/rte_eth_softnic.c         |  2 +-
 drivers/net/szedata2/rte_eth_szedata2.c       |  4 +-
 drivers/net/tap/rte_eth_tap.c                 |  2 +-
 drivers/net/thunderx/nicvf_ethdev.c           |  6 +--
 drivers/net/txgbe/txgbe_ethdev.c              | 12 +++---
 drivers/net/vdev_netvsc/vdev_netvsc.c         |  2 +-
 drivers/net/vhost/rte_eth_vhost.c             |  2 +-
 drivers/net/virtio/virtio_ethdev.c            |  4 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c          |  4 +-
 drivers/raw/ifpga/ifpga_rawdev.c              |  2 +-
 drivers/raw/ioat/ioat_rawdev.c                |  2 +-
 drivers/raw/ntb/ntb.c                         |  2 +-
 drivers/raw/skeleton/skeleton_rawdev.c        |  2 +-
 drivers/regex/mlx5/mlx5_regex.c               |  3 +-
 drivers/vdpa/mlx5/mlx5_vdpa.c                 |  2 +-
 lib/librte_bbdev/rte_bbdev.c                  |  2 +-
 lib/librte_bpf/bpf.c                          |  2 +-
 lib/librte_cfgfile/rte_cfgfile.c              |  2 +-
 lib/librte_compressdev/rte_compressdev.c      |  2 +-
 lib/librte_eal/common/eal_common_log.c        | 39 +++++++++++++++++
 lib/librte_eal/include/rte_log.h              | 43 ++++++++++++++++---
 lib/librte_eal/version.map                    |  1 +
 lib/librte_ethdev/rte_ethdev.c                |  2 +-
 lib/librte_eventdev/rte_event_timer_adapter.c |  6 +--
 lib/librte_flow_classify/rte_flow_classify.c  |  2 +-
 lib/librte_graph/graph.c                      |  2 +-
 lib/librte_member/rte_member.c                |  2 +-
 lib/librte_metrics/rte_metrics_telemetry.c    |  2 +-
 lib/librte_net/rte_net_crc.c                  |  2 +-
 lib/librte_node/log.c                         |  2 +-
 lib/librte_pdump/rte_pdump.c                  |  2 +-
 lib/librte_rawdev/rte_rawdev.c                |  2 +-
 lib/librte_rcu/rte_rcu_qsbr.c                 |  2 +-
 lib/librte_stack/rte_stack.c                  |  2 +-
 lib/librte_vhost/vhost.c                      |  4 +-
 109 files changed, 243 insertions(+), 174 deletions(-)

Comments

Bruce Richardson April 9, 2021, 1:01 p.m. UTC | #1
On Fri, Apr 09, 2021 at 02:43:34PM +0200, David Marchand wrote:
> Let's try to enforce the convention where drivers use a pmd. logtype
> with their class reflected in it and libraries use a lib. logtype.
> 
> RTE_LOG_REGISTER now interprets the log type name:
> - if none or a name starting with a . is passed, then the default logtype
>   is used as a prefix,
> - else the name is used as is to deal with components that do not comply
>   with the current convention,
> 
> Note: achieved with below command (+ manual edit on crypto/virtio,
> compress/mlx5 and regex/mlx5).
> $ git grep -l RTE_LOG_REGISTER drivers/ |
>   while read file; do
>     pattern=${file##drivers/};
>     class=${pattern%%/*};
>     pattern=${pattern#$class/};
>     pattern=pmd.$class.${pattern%%/*};
>     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\(\|\..*\),/RTE_LOG_REGISTER(\1, \2,/' $file;
>   done
> 
> $ git grep -l RTE_LOG_REGISTER lib/ |
>   while read file; do
>     pattern=${file##lib/librte_};
>     pattern=lib.${pattern%%/*};
>     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\(\|\..*\),/RTE_LOG_REGISTER(\1, \2,/' $file;
>   done
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> This is an alternative to the devtools check I had proposed [1].
> This can be seen as a RFC, but if people are happy with it, I don't see
> much to add.
> 
> 1: https://patchwork.dpdk.org/project/dpdk/list/?series=15796
> 
> ---
<snip> 
> diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
> index 91bee65e7b..fb315f02e9 100644
> --- a/drivers/common/dpaax/dpaax_iova_table.c
> +++ b/drivers/common/dpaax/dpaax_iova_table.c
> @@ -460,4 +460,4 @@ dpaax_handle_memevents(void)
>  					       dpaax_memevent_cb, NULL);
>  }
>  
> -RTE_LOG_REGISTER(dpaax_logger, pmd.common.dpaax, ERR);
> +RTE_LOG_REGISTER(dpaax_logger, , ERR);

Sorry, but this blank field looks really wrong to me, and I'd rather find a
better solution.

How about as part of the cflags for each component adding
"-D" flag with the default component log name, that can be used in place of
the blank, or added to as needed?

/Bruce
David Marchand April 13, 2021, 3:07 p.m. UTC | #2
On Fri, Apr 9, 2021 at 3:01 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Fri, Apr 09, 2021 at 02:43:34PM +0200, David Marchand wrote:
> > Let's try to enforce the convention where drivers use a pmd. logtype
> > with their class reflected in it and libraries use a lib. logtype.
> >
> > RTE_LOG_REGISTER now interprets the log type name:
> > - if none or a name starting with a . is passed, then the default logtype
> >   is used as a prefix,
> > - else the name is used as is to deal with components that do not comply
> >   with the current convention,
> >
> > Note: achieved with below command (+ manual edit on crypto/virtio,
> > compress/mlx5 and regex/mlx5).
> > $ git grep -l RTE_LOG_REGISTER drivers/ |
> >   while read file; do
> >     pattern=${file##drivers/};
> >     class=${pattern%%/*};
> >     pattern=${pattern#$class/};
> >     pattern=pmd.$class.${pattern%%/*};
> >     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\(\|\..*\),/RTE_LOG_REGISTER(\1, \2,/' $file;
> >   done
> >
> > $ git grep -l RTE_LOG_REGISTER lib/ |
> >   while read file; do
> >     pattern=${file##lib/librte_};
> >     pattern=lib.${pattern%%/*};
> >     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\(\|\..*\),/RTE_LOG_REGISTER(\1, \2,/' $file;
> >   done
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > ---
> > This is an alternative to the devtools check I had proposed [1].
> > This can be seen as a RFC, but if people are happy with it, I don't see
> > much to add.
> >
> > 1: https://patchwork.dpdk.org/project/dpdk/list/?series=15796
> >
> > ---
> <snip>
> > diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
> > index 91bee65e7b..fb315f02e9 100644
> > --- a/drivers/common/dpaax/dpaax_iova_table.c
> > +++ b/drivers/common/dpaax/dpaax_iova_table.c
> > @@ -460,4 +460,4 @@ dpaax_handle_memevents(void)
> >                                              dpaax_memevent_cb, NULL);
> >  }
> >
> > -RTE_LOG_REGISTER(dpaax_logger, pmd.common.dpaax, ERR);
> > +RTE_LOG_REGISTER(dpaax_logger, , ERR);
>
> Sorry, but this blank field looks really wrong to me, and I'd rather find a
> better solution.
>
> How about as part of the cflags for each component adding
> "-D" flag with the default component log name, that can be used in place of
> the blank, or added to as needed?

Ok, resolving this name at build time is better.

I prefer separate macros though:
- keeping RTE_LOG_REGISTER untouched (and usable out of the dpdk tree)
- introducing RTE_LOG_REGISTER_DEFAULT_LOGTYPE(type, level) (for
components who need only one handle)
- introducing RTE_LOG_REGISTER_LOGTYPE(type, suffix, level) (for those
who want more).
diff mbox series

Patch

diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index 91bee65e7b..fb315f02e9 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -460,4 +460,4 @@  dpaax_handle_memevents(void)
 					       dpaax_memevent_cb, NULL);
 }
 
-RTE_LOG_REGISTER(dpaax_logger, pmd.common.dpaax, ERR);
+RTE_LOG_REGISTER(dpaax_logger, , ERR);
diff --git a/drivers/common/iavf/iavf_impl.c b/drivers/common/iavf/iavf_impl.c
index 08147314c6..552f22069f 100644
--- a/drivers/common/iavf/iavf_impl.c
+++ b/drivers/common/iavf/iavf_impl.c
@@ -85,4 +85,4 @@  iavf_free_virt_mem_d(__rte_unused struct iavf_hw *hw,
 	return IAVF_SUCCESS;
 }
 
-RTE_LOG_REGISTER(iavf_common_logger, pmd.common.iavf, NOTICE);
+RTE_LOG_REGISTER(iavf_common_logger, , NOTICE);
diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c
index f92f05bda5..f4d1b27097 100644
--- a/drivers/common/mlx5/mlx5_common.c
+++ b/drivers/common/mlx5/mlx5_common.c
@@ -39,7 +39,7 @@  static inline void mlx5_cpu_id(unsigned int level,
 }
 #endif
 
-RTE_LOG_REGISTER(mlx5_common_logtype, pmd.common.mlx5, NOTICE)
+RTE_LOG_REGISTER(mlx5_common_logtype, , NOTICE)
 
 static bool mlx5_common_initialized;
 
diff --git a/drivers/compress/isal/isal_compress_pmd.c b/drivers/compress/isal/isal_compress_pmd.c
index 0ecca12a83..79d339bd14 100644
--- a/drivers/compress/isal/isal_compress_pmd.c
+++ b/drivers/compress/isal/isal_compress_pmd.c
@@ -750,4 +750,4 @@  static struct rte_vdev_driver compdev_isal_pmd_drv = {
 RTE_PMD_REGISTER_VDEV(COMPDEV_NAME_ISAL_PMD, compdev_isal_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(COMPDEV_NAME_ISAL_PMD,
 	"socket_id=<int>");
-RTE_LOG_REGISTER(isal_logtype_driver, pmd.compress.isal, INFO);
+RTE_LOG_REGISTER(isal_logtype_driver, , INFO);
diff --git a/drivers/compress/mlx5/mlx5_compress.c b/drivers/compress/mlx5/mlx5_compress.c
index ec3c237512..5f96ce7fc1 100644
--- a/drivers/compress/mlx5/mlx5_compress.c
+++ b/drivers/compress/mlx5/mlx5_compress.c
@@ -23,7 +23,6 @@ 
 #include "mlx5_compress_utils.h"
 
 #define MLX5_COMPRESS_DRIVER_NAME mlx5_compress
-#define MLX5_COMPRESS_LOG_NAME    pmd.compress.mlx5
 #define MLX5_COMPRESS_MAX_QPS 1024
 #define MLX5_COMP_MAX_WIN_SIZE_CONF 6u
 
@@ -901,7 +900,7 @@  RTE_INIT(rte_mlx5_compress_init)
 		mlx5_pci_driver_register(&mlx5_compress_driver);
 }
 
-RTE_LOG_REGISTER(mlx5_compress_logtype, MLX5_COMPRESS_LOG_NAME, NOTICE)
+RTE_LOG_REGISTER(mlx5_compress_logtype, , NOTICE)
 RTE_PMD_EXPORT_NAME(MLX5_COMPRESS_DRIVER_NAME, __COUNTER__);
 RTE_PMD_REGISTER_PCI_TABLE(MLX5_COMPRESS_DRIVER_NAME, mlx5_compress_pci_id_map);
 RTE_PMD_REGISTER_KMOD_DEP(MLX5_COMPRESS_DRIVER_NAME, "* ib_uverbs & mlx5_core & mlx5_ib");
diff --git a/drivers/compress/octeontx/otx_zip_pmd.c b/drivers/compress/octeontx/otx_zip_pmd.c
index bee90fc7cd..8db75234bf 100644
--- a/drivers/compress/octeontx/otx_zip_pmd.c
+++ b/drivers/compress/octeontx/otx_zip_pmd.c
@@ -646,4 +646,4 @@  static struct rte_pci_driver octtx_zip_pmd = {
 
 RTE_PMD_REGISTER_PCI(COMPRESSDEV_NAME_ZIP_PMD, octtx_zip_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(COMPRESSDEV_NAME_ZIP_PMD, pci_id_octtx_zipvf_table);
-RTE_LOG_REGISTER(octtx_zip_logtype_driver, pmd.compress.octeontx, INFO);
+RTE_LOG_REGISTER(octtx_zip_logtype_driver, , INFO);
diff --git a/drivers/compress/zlib/zlib_pmd.c b/drivers/compress/zlib/zlib_pmd.c
index 8a79d15c98..4440085af1 100644
--- a/drivers/compress/zlib/zlib_pmd.c
+++ b/drivers/compress/zlib/zlib_pmd.c
@@ -426,4 +426,4 @@  static struct rte_vdev_driver zlib_pmd_drv = {
 };
 
 RTE_PMD_REGISTER_VDEV(COMPRESSDEV_NAME_ZLIB_PMD, zlib_pmd_drv);
-RTE_LOG_REGISTER(zlib_logtype_driver, pmd.compress.zlib, INFO);
+RTE_LOG_REGISTER(zlib_logtype_driver, , INFO);
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 0de51202a6..7a43ed49d9 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -975,4 +975,4 @@  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_gcm_crypto_drv, aesni_gcm_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(aesni_gcm_logtype_driver, pmd.crypto.aesni_gcm, NOTICE);
+RTE_LOG_REGISTER(aesni_gcm_logtype_driver, , NOTICE);
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 03186485f9..713f4ab3d9 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -2229,4 +2229,4 @@  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD,
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_mb_crypto_drv,
 		cryptodev_aesni_mb_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(aesni_mb_logtype_driver, pmd.crypto.aesni_mb, NOTICE);
+RTE_LOG_REGISTER(aesni_mb_logtype_driver, , NOTICE);
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index 3f6cb66ba2..4d85c5e4f0 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -864,7 +864,7 @@  static struct rte_vdev_driver armv8_crypto_pmd_drv = {
 
 static struct cryptodev_driver armv8_crypto_drv;
 
-RTE_LOG_REGISTER(crypto_armv8_log_type, pmd.crypto.armv8, ERR);
+RTE_LOG_REGISTER(crypto_armv8_log_type, , ERR);
 
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ARMV8_PMD, armv8_crypto_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_ARMV8_PMD, cryptodev_armv8_pmd);
diff --git a/drivers/crypto/bcmfs/bcmfs_logs.c b/drivers/crypto/bcmfs/bcmfs_logs.c
index 9faf12f238..2605e5dd9e 100644
--- a/drivers/crypto/bcmfs/bcmfs_logs.c
+++ b/drivers/crypto/bcmfs/bcmfs_logs.c
@@ -21,5 +21,5 @@  bcmfs_hexdump_log(uint32_t level, uint32_t logtype, const char *title,
 	return 0;
 }
 
-RTE_LOG_REGISTER(bcmfs_conf_logtype, pmd.crypto.bcmfs.config, NOTICE)
-RTE_LOG_REGISTER(bcmfs_dp_logtype, pmd.crypto.bcmfs.fp, NOTICE)
+RTE_LOG_REGISTER(bcmfs_conf_logtype, .config, NOTICE)
+RTE_LOG_REGISTER(bcmfs_dp_logtype, .fp, NOTICE)
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 5ff1b5c562..0e64ae88de 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -639,4 +639,4 @@  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD,
 RTE_PMD_REGISTER_CRYPTO_DRIVER(kasumi_crypto_drv,
 		cryptodev_kasumi_pmd_drv.driver, cryptodev_driver_id);
 
-RTE_LOG_REGISTER(kasumi_logtype_driver, pmd.crypto.kasumi, NOTICE);
+RTE_LOG_REGISTER(kasumi_logtype_driver, , NOTICE);
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index bec51c9ff6..f93b90c0d8 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -1019,4 +1019,4 @@  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_MRVL_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(mrvl_crypto_drv, cryptodev_mrvl_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(mrvl_logtype_driver, pmd.crypto.mvsam, NOTICE);
+RTE_LOG_REGISTER(mrvl_logtype_driver, , NOTICE);
diff --git a/drivers/crypto/nitrox/nitrox_logs.c b/drivers/crypto/nitrox/nitrox_logs.c
index 26395159aa..635c7efa47 100644
--- a/drivers/crypto/nitrox/nitrox_logs.c
+++ b/drivers/crypto/nitrox/nitrox_logs.c
@@ -4,4 +4,4 @@ 
 
 #include <rte_log.h>
 
-RTE_LOG_REGISTER(nitrox_logtype, pmd.crypto.nitrox, NOTICE);
+RTE_LOG_REGISTER(nitrox_logtype, , NOTICE);
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index e04042e757..6f717c3fbc 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -248,4 +248,4 @@  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(null_logtype_driver, pmd.crypto.null, INFO);
+RTE_LOG_REGISTER(null_logtype_driver, , INFO);
diff --git a/drivers/crypto/octeontx/otx_cryptodev.c b/drivers/crypto/octeontx/otx_cryptodev.c
index 5ce1cf82fd..ab23fdb4df 100644
--- a/drivers/crypto/octeontx/otx_cryptodev.c
+++ b/drivers/crypto/octeontx/otx_cryptodev.c
@@ -111,4 +111,4 @@  RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_OCTEONTX_PMD, pci_id_cpt_table);
 RTE_PMD_REGISTER_KMOD_DEP(CRYPTODEV_NAME_OCTEONTX_PMD, "vfio-pci");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(otx_cryptodev_drv, otx_cryptodev_pmd.driver,
 		otx_cryptodev_driver_id);
-RTE_LOG_REGISTER(otx_cpt_logtype, pmd.crypto.octeontx, NOTICE);
+RTE_LOG_REGISTER(otx_cpt_logtype, , NOTICE);
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c b/drivers/crypto/octeontx2/otx2_cryptodev.c
index e0a559b663..edbecf3867 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev.c
@@ -176,4 +176,4 @@  RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_OCTEONTX2_PMD, pci_id_cpt_table);
 RTE_PMD_REGISTER_KMOD_DEP(CRYPTODEV_NAME_OCTEONTX2_PMD, "vfio-pci");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(otx2_cryptodev_drv, otx2_cryptodev_pmd.driver,
 		otx2_cryptodev_driver_id);
-RTE_LOG_REGISTER(otx2_cpt_logtype, pmd.crypto.octeontx2, NOTICE);
+RTE_LOG_REGISTER(otx2_cpt_logtype, , NOTICE);
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 7d3959f550..4dadc0d150 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -2278,4 +2278,4 @@  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_OPENSSL_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv,
 		cryptodev_openssl_pmd_drv.driver, cryptodev_driver_id);
-RTE_LOG_REGISTER(openssl_logtype_driver, pmd.crypto.openssl, INFO);
+RTE_LOG_REGISTER(openssl_logtype_driver, , INFO);
diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
index 9367a0e915..4db1c97202 100644
--- a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
+++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
@@ -577,4 +577,4 @@  rte_cryptodev_scheduler_option_get(uint8_t scheduler_id,
 }
 
 
-RTE_LOG_REGISTER(scheduler_logtype_driver, pmd.crypto.scheduler, INFO);
+RTE_LOG_REGISTER(scheduler_logtype_driver, , INFO);
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 962868e1fc..e106680104 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -653,4 +653,4 @@  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv,
 		cryptodev_snow3g_pmd_drv.driver, cryptodev_driver_id);
-RTE_LOG_REGISTER(snow3g_logtype_driver, pmd.crypto.snow3g, INFO);
+RTE_LOG_REGISTER(snow3g_logtype_driver, , INFO);
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 1822f21744..2491f94658 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1483,10 +1483,8 @@  RTE_PMD_REGISTER_PCI(CRYPTODEV_NAME_VIRTIO_PMD, rte_virtio_crypto_driver);
 RTE_PMD_REGISTER_CRYPTO_DRIVER(virtio_crypto_drv,
 	rte_virtio_crypto_driver.driver,
 	cryptodev_virtio_driver_id);
-RTE_LOG_REGISTER(virtio_crypto_logtype_init, pmd.crypto.virtio.init, NOTICE);
-RTE_LOG_REGISTER(virtio_crypto_logtype_session, pmd.crypto.virtio.session,
-		 NOTICE);
-RTE_LOG_REGISTER(virtio_crypto_logtype_rx, pmd.crypto.virtio.rx, NOTICE);
-RTE_LOG_REGISTER(virtio_crypto_logtype_tx, pmd.crypto.virtio.tx, NOTICE);
-RTE_LOG_REGISTER(virtio_crypto_logtype_driver, pmd.crypto.virtio.driver,
-		 NOTICE);
+RTE_LOG_REGISTER(virtio_crypto_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(virtio_crypto_logtype_session, .session, NOTICE);
+RTE_LOG_REGISTER(virtio_crypto_logtype_rx, .rx, NOTICE);
+RTE_LOG_REGISTER(virtio_crypto_logtype_tx, .tx, NOTICE);
+RTE_LOG_REGISTER(virtio_crypto_logtype_driver, .driver, NOTICE);
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index a9ff318281..0cc4dadd46 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -580,4 +580,4 @@  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(zuc_logtype_driver, pmd.crypto.zuc, INFO);
+RTE_LOG_REGISTER(zuc_logtype_driver, , INFO);
diff --git a/drivers/event/dlb/dlb.c b/drivers/event/dlb/dlb.c
index 60084ced3b..e621253724 100644
--- a/drivers/event/dlb/dlb.c
+++ b/drivers/event/dlb/dlb.c
@@ -4082,4 +4082,4 @@  dlb_parse_params(const char *params,
 	}
 	return ret;
 }
-RTE_LOG_REGISTER(eventdev_dlb_log_level, pmd.event.dlb, NOTICE);
+RTE_LOG_REGISTER(eventdev_dlb_log_level, , NOTICE);
diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index fb5ff012a4..738b5a1a6b 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -4032,4 +4032,4 @@  dlb2_parse_params(const char *params,
 	}
 	return ret;
 }
-RTE_LOG_REGISTER(eventdev_dlb2_log_level, pmd.event.dlb2, NOTICE);
+RTE_LOG_REGISTER(eventdev_dlb2_log_level, , NOTICE);
diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
index 460375ca30..d8fd731f27 100644
--- a/drivers/event/dpaa/dpaa_eventdev.c
+++ b/drivers/event/dpaa/dpaa_eventdev.c
@@ -46,7 +46,7 @@ 
  * Eventqueue = Channel Instance
  * 1 Eventdev can have N Eventqueue
  */
-RTE_LOG_REGISTER(dpaa_logtype_eventdev, pmd.event.dpaa, NOTICE);
+RTE_LOG_REGISTER(dpaa_logtype_eventdev, , NOTICE);
 
 #define DISABLE_INTR_MODE "disable_intr"
 
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index e4fa3a2e46..abf1e19111 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -1206,4 +1206,4 @@  static struct rte_vdev_driver vdev_eventdev_dpaa2_pmd = {
 };
 
 RTE_PMD_REGISTER_VDEV(EVENTDEV_NAME_DPAA2_PMD, vdev_eventdev_dpaa2_pmd);
-RTE_LOG_REGISTER(dpaa2_logtype_event, pmd.event.dpaa2, NOTICE);
+RTE_LOG_REGISTER(dpaa2_logtype_event, , NOTICE);
diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index 17325bbf6a..70d98e763f 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -22,7 +22,7 @@ 
 
 static uint8_t timvf_enable_stats;
 
-RTE_LOG_REGISTER(otx_logtype_ssovf, pmd.event.octeontx, NOTICE);
+RTE_LOG_REGISTER(otx_logtype_ssovf, , NOTICE);
 
 /* SSOPF Mailbox messages */
 
diff --git a/drivers/event/octeontx/timvf_evdev.c b/drivers/event/octeontx/timvf_evdev.c
index 8af4d6e37f..5dd8320c66 100644
--- a/drivers/event/octeontx/timvf_evdev.c
+++ b/drivers/event/octeontx/timvf_evdev.c
@@ -5,7 +5,7 @@ 
 #include "ssovf_evdev.h"
 #include "timvf_evdev.h"
 
-RTE_LOG_REGISTER(otx_logtype_timvf, pmd.event.octeontx.timer, NOTICE);
+RTE_LOG_REGISTER(otx_logtype_timvf, .timer, NOTICE);
 
 static struct rte_eventdev *event_dev;
 
diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c
index 3050578ffd..c1e890a3ea 100644
--- a/drivers/event/opdl/opdl_evdev.c
+++ b/drivers/event/opdl/opdl_evdev.c
@@ -755,7 +755,7 @@  static struct rte_vdev_driver evdev_opdl_pmd_drv = {
 	.remove = opdl_remove
 };
 
-RTE_LOG_REGISTER(opdl_logtype_driver, pmd.event.opdl.driver, INFO);
+RTE_LOG_REGISTER(opdl_logtype_driver, .driver, INFO);
 
 RTE_PMD_REGISTER_VDEV(EVENTDEV_NAME_OPDL_PMD, evdev_opdl_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(event_opdl, NUMA_NODE_ARG "=<int>"
diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index 0d8013adf7..e9a05b5b5a 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -1151,4 +1151,4 @@  RTE_PMD_REGISTER_PARAM_STRING(event_sw, NUMA_NODE_ARG "=<int> "
 		SCHED_QUANTA_ARG "=<int>" CREDIT_QUANTA_ARG "=<int>"
 		MIN_BURST_SIZE_ARG "=<int>" DEQ_BURST_SIZE_ARG "=<int>"
 		REFIL_ONCE_ARG "=<int>");
-RTE_LOG_REGISTER(eventdev_sw_log_level, pmd.event.sw, NOTICE);
+RTE_LOG_REGISTER(eventdev_sw_log_level, , NOTICE);
diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c
index 94dc5cd815..acbc93d760 100644
--- a/drivers/mempool/octeontx/octeontx_fpavf.c
+++ b/drivers/mempool/octeontx/octeontx_fpavf.c
@@ -105,7 +105,7 @@  struct octeontx_fpadev {
 
 static struct octeontx_fpadev fpadev;
 
-RTE_LOG_REGISTER(octeontx_logtype_fpavf, pmd.mempool.octeontx, NOTICE);
+RTE_LOG_REGISTER(octeontx_logtype_fpavf, , NOTICE);
 
 /* lock is taken by caller */
 static int
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index a04f7c773a..bd0a21ee8e 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -97,7 +97,7 @@  static struct rte_eth_link pmd_link = {
 	.link_autoneg = ETH_LINK_FIXED,
 };
 
-RTE_LOG_REGISTER(af_packet_logtype, pmd.net.af_packet, NOTICE);
+RTE_LOG_REGISTER(af_packet_logtype, , NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, af_packet_logtype, \
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 6e44a21c64..683d9a4854 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -61,7 +61,7 @@ 
 #define PF_XDP AF_XDP
 #endif
 
-RTE_LOG_REGISTER(af_xdp_logtype, pmd.net.af_xdp, NOTICE);
+RTE_LOG_REGISTER(af_xdp_logtype, , NOTICE);
 
 #define AF_XDP_LOG(level, fmt, args...)			\
 	rte_log(RTE_LOG_ ## level, af_xdp_logtype,	\
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index 9dea5facb4..5afd08d46f 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -1015,4 +1015,4 @@  RTE_PMD_REGISTER_PARAM_STRING(net_ark,
 			      ARK_PKTGEN_ARG "=<filename> "
 			      ARK_PKTCHKR_ARG "=<filename> "
 			      ARK_PKTDIR_ARG "=<bitmap>");
-RTE_LOG_REGISTER(ark_logtype, pmd.net.ark, NOTICE);
+RTE_LOG_REGISTER(ark_logtype, , NOTICE);
diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index 473f6209f6..8e392664d5 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -1914,5 +1914,5 @@  is_atlantic_supported(struct rte_eth_dev *dev)
 RTE_PMD_REGISTER_PCI(net_atlantic, rte_atl_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_atlantic, pci_id_atl_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_atlantic, "* igb_uio | uio_pci_generic");
-RTE_LOG_REGISTER(atl_logtype_init, pmd.net.atlantic.init, NOTICE);
-RTE_LOG_REGISTER(atl_logtype_driver, pmd.net.atlantic.driver, NOTICE);
+RTE_LOG_REGISTER(atl_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(atl_logtype_driver, .driver, NOTICE);
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index 566a3606a2..06c17fc736 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -2309,4 +2309,4 @@  avp_dev_stats_reset(struct rte_eth_dev *eth_dev)
 
 RTE_PMD_REGISTER_PCI(net_avp, rte_avp_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_avp, pci_id_avp_map);
-RTE_LOG_REGISTER(avp_logtype_driver, pmd.net.avp.driver, NOTICE);
+RTE_LOG_REGISTER(avp_logtype_driver, .driver, NOTICE);
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index ebe9a2876d..705672333e 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -2377,5 +2377,5 @@  static struct rte_pci_driver rte_axgbe_pmd = {
 RTE_PMD_REGISTER_PCI(net_axgbe, rte_axgbe_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_axgbe, pci_id_axgbe_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_axgbe, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(axgbe_logtype_init, pmd.net.axgbe.init, NOTICE);
-RTE_LOG_REGISTER(axgbe_logtype_driver, pmd.net.axgbe.driver, NOTICE);
+RTE_LOG_REGISTER(axgbe_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(axgbe_logtype_driver, .driver, NOTICE);
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 50db70dfcd..0403d8375c 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -817,5 +817,5 @@  RTE_PMD_REGISTER_KMOD_DEP(net_bnx2x, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PCI(net_bnx2xvf, rte_bnx2xvf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_bnx2xvf, pci_id_bnx2xvf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_bnx2xvf, "* igb_uio | vfio-pci");
-RTE_LOG_REGISTER(bnx2x_logtype_init, pmd.net.bnx2x.init, NOTICE);
-RTE_LOG_REGISTER(bnx2x_logtype_driver, pmd.net.bnx2x.driver, NOTICE);
+RTE_LOG_REGISTER(bnx2x_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(bnx2x_logtype_driver, .driver, NOTICE);
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 2bd889b15b..b03aa561f2 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -6141,7 +6141,7 @@  bool is_bnxt_supported(struct rte_eth_dev *dev)
 	return is_device_supported(dev, &bnxt_rte_pmd);
 }
 
-RTE_LOG_REGISTER(bnxt_logtype_driver, pmd.net.bnxt.driver, NOTICE);
+RTE_LOG_REGISTER(bnxt_logtype_driver, .driver, NOTICE);
 RTE_PMD_REGISTER_PCI(net_bnxt, bnxt_rte_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_bnxt, bnxt_pci_id_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_bnxt, "* igb_uio | uio_pci_generic | vfio-pci");
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 2e9cea5b8e..23446c1db0 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3775,4 +3775,4 @@  RTE_PMD_REGISTER_PARAM_STRING(net_bonding,
 	"up_delay=<int> "
 	"down_delay=<int>");
 
-RTE_LOG_REGISTER(bond_logtype, pmd.net.bonding, NOTICE);
+RTE_LOG_REGISTER(bond_logtype, , NOTICE);
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index e8a2de3ef3..6f915f01cc 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -1474,5 +1474,5 @@  RTE_PMD_REGISTER_PARAM_STRING(net_cxgbe,
 			      CXGBE_DEVARG_CMN_TX_MODE_LATENCY "=<0|1> "
 			      CXGBE_DEVARG_PF_FILTER_MODE "=<uint32> "
 			      CXGBE_DEVARG_PF_FILTER_MASK "=<uint32> ");
-RTE_LOG_REGISTER(cxgbe_logtype, pmd.net.cxgbe, NOTICE);
-RTE_LOG_REGISTER(cxgbe_mbox_logtype, pmd.net.cxgbe.mbox, NOTICE);
+RTE_LOG_REGISTER(cxgbe_logtype, , NOTICE);
+RTE_LOG_REGISTER(cxgbe_mbox_logtype, .mbox, NOTICE);
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 176943a8ea..63efdb7b8f 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -2309,4 +2309,4 @@  static struct rte_dpaa_driver rte_dpaa_pmd = {
 };
 
 RTE_PMD_REGISTER_DPAA(net_dpaa, rte_dpaa_pmd);
-RTE_LOG_REGISTER(dpaa_logtype_pmd, pmd.net.dpaa, NOTICE);
+RTE_LOG_REGISTER(dpaa_logtype_pmd, , NOTICE);
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 9011dcfc12..b95ffb95c3 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -2893,4 +2893,4 @@  RTE_PMD_REGISTER_PARAM_STRING(net_dpaa2,
 		DRIVER_NO_PREFETCH_MODE "=<int>"
 		DRIVER_TX_CONF "=<int>"
 		DRIVER_ERROR_QUEUE "=<int>");
-RTE_LOG_REGISTER(dpaa2_logtype_pmd, pmd.net.dpaa2, NOTICE);
+RTE_LOG_REGISTER(dpaa2_logtype_pmd, , NOTICE);
diff --git a/drivers/net/e1000/e1000_logs.c b/drivers/net/e1000/e1000_logs.c
index d9b8a4672f..41e10b50ce 100644
--- a/drivers/net/e1000/e1000_logs.c
+++ b/drivers/net/e1000/e1000_logs.c
@@ -4,14 +4,14 @@ 
 
 #include "e1000_logs.h"
 
-RTE_LOG_REGISTER(e1000_logtype_init, pmd.net.e1000.init, NOTICE)
-RTE_LOG_REGISTER(e1000_logtype_driver, pmd.net.e1000.driver, NOTICE)
+RTE_LOG_REGISTER(e1000_logtype_init, .init, NOTICE)
+RTE_LOG_REGISTER(e1000_logtype_driver, .driver, NOTICE)
 #ifdef RTE_LIBRTE_E1000_DEBUG_RX
-RTE_LOG_REGISTER(e1000_logtype_rx, pmd.net.e1000.rx, DEBUG)
+RTE_LOG_REGISTER(e1000_logtype_rx, .rx, DEBUG)
 #endif
 #ifdef RTE_LIBRTE_E1000_DEBUG_TX
-RTE_LOG_REGISTER(e1000_logtype_tx, pmd.net.e1000.tx, DEBUG)
+RTE_LOG_REGISTER(e1000_logtype_tx, .tx, DEBUG)
 #endif
 #ifdef RTE_LIBRTE_E1000_DEBUG_TX_FREE
-RTE_LOG_REGISTER(e1000_logtype_tx_free, pmd.net.e1000.tx_free, DEBUG)
+RTE_LOG_REGISTER(e1000_logtype_tx_free, .tx_free, DEBUG)
 #endif
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 9aa51c9dcf..cec64760c5 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -2924,19 +2924,19 @@  RTE_PMD_REGISTER_PCI(net_ena, rte_ena_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ena, pci_id_ena_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_ena, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PARAM_STRING(net_ena, ENA_DEVARG_LARGE_LLQ_HDR "=<0|1>");
-RTE_LOG_REGISTER(ena_logtype_init, pmd.net.ena.init, NOTICE);
-RTE_LOG_REGISTER(ena_logtype_driver, pmd.net.ena.driver, NOTICE);
+RTE_LOG_REGISTER(ena_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(ena_logtype_driver, .driver, NOTICE);
 #ifdef RTE_LIBRTE_ENA_DEBUG_RX
-RTE_LOG_REGISTER(ena_logtype_rx, pmd.net.ena.rx, NOTICE);
+RTE_LOG_REGISTER(ena_logtype_rx, .rx, NOTICE);
 #endif
 #ifdef RTE_LIBRTE_ENA_DEBUG_TX
-RTE_LOG_REGISTER(ena_logtype_tx, pmd.net.ena.tx, NOTICE);
+RTE_LOG_REGISTER(ena_logtype_tx, .tx, NOTICE);
 #endif
 #ifdef RTE_LIBRTE_ENA_DEBUG_TX_FREE
-RTE_LOG_REGISTER(ena_logtype_tx_free, pmd.net.ena.tx_free, NOTICE);
+RTE_LOG_REGISTER(ena_logtype_tx_free, .tx_free, NOTICE);
 #endif
 #ifdef RTE_LIBRTE_ENA_COM_DEBUG
-RTE_LOG_REGISTER(ena_logtype_com, pmd.net.ena.com, NOTICE);
+RTE_LOG_REGISTER(ena_logtype_com, .com, NOTICE);
 #endif
 
 /******************************************************************************
diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c
index 0b45168c60..e249d74573 100644
--- a/drivers/net/enetc/enetc_ethdev.c
+++ b/drivers/net/enetc/enetc_ethdev.c
@@ -960,4 +960,4 @@  static struct rte_pci_driver rte_enetc_pmd = {
 RTE_PMD_REGISTER_PCI(net_enetc, rte_enetc_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_enetc, pci_id_enetc_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_enetc, "* vfio-pci");
-RTE_LOG_REGISTER(enetc_logtype_pmd, pmd.net.enetc, NOTICE);
+RTE_LOG_REGISTER(enetc_logtype_pmd, , NOTICE);
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index d91c2cdc8c..058af199ea 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -71,7 +71,7 @@  static const struct vic_speed_capa {
 #define ENIC_DEVARG_IG_VLAN_REWRITE "ig-vlan-rewrite"
 #define ENIC_DEVARG_REPRESENTOR "representor"
 
-RTE_LOG_REGISTER(enic_pmd_logtype, pmd.net.enic, INFO);
+RTE_LOG_REGISTER(enic_pmd_logtype, , INFO);
 
 static int
 enicpmd_dev_flow_ops_get(struct rte_eth_dev *dev,
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index e3bda0df2b..eee921e6fb 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -391,4 +391,4 @@  static struct rte_vdev_driver failsafe_drv = {
 
 RTE_PMD_REGISTER_VDEV(net_failsafe, failsafe_drv);
 RTE_PMD_REGISTER_PARAM_STRING(net_failsafe, PMD_FAILSAFE_PARAM_STRING);
-RTE_LOG_REGISTER(failsafe_logtype, pmd.net.failsafe, NOTICE)
+RTE_LOG_REGISTER(failsafe_logtype, , NOTICE)
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index fd471c415e..d4ca2d414f 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -3285,14 +3285,14 @@  static struct rte_pci_driver rte_pmd_fm10k = {
 RTE_PMD_REGISTER_PCI(net_fm10k, rte_pmd_fm10k);
 RTE_PMD_REGISTER_PCI_TABLE(net_fm10k, pci_id_fm10k_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_fm10k, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(fm10k_logtype_init, pmd.net.fm10k.init, NOTICE);
-RTE_LOG_REGISTER(fm10k_logtype_driver, pmd.net.fm10k.driver, NOTICE);
+RTE_LOG_REGISTER(fm10k_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(fm10k_logtype_driver, .driver, NOTICE);
 #ifdef RTE_LIBRTE_FM10K_DEBUG_RX
-RTE_LOG_REGISTER(fm10k_logtype_rx, pmd.net.fm10k.rx, DEBUG);
+RTE_LOG_REGISTER(fm10k_logtype_rx, .rx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_FM10K_DEBUG_TX
-RTE_LOG_REGISTER(fm10k_logtype_tx, pmd.net.fm10k.tx, DEBUG);
+RTE_LOG_REGISTER(fm10k_logtype_tx, .tx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_FM10K_DEBUG_TX_FREE
-RTE_LOG_REGISTER(fm10k_logtype_tx_free, pmd.net.fm10k.tx_free, DEBUG);
+RTE_LOG_REGISTER(fm10k_logtype_tx_free, .tx_free, DEBUG);
 #endif
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index b5a36a863b..4b6402e42d 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -3266,4 +3266,4 @@  static struct rte_pci_driver rte_hinic_pmd = {
 
 RTE_PMD_REGISTER_PCI(net_hinic, rte_hinic_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_hinic, pci_id_hinic_map);
-RTE_LOG_REGISTER(hinic_logtype, pmd.net.hinic, INFO);
+RTE_LOG_REGISTER(hinic_logtype, , INFO);
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 9c718082b0..90581fe8e0 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6866,5 +6866,5 @@  RTE_PMD_REGISTER_KMOD_DEP(net_hns3, "* igb_uio | vfio-pci");
 RTE_PMD_REGISTER_PARAM_STRING(net_hns3,
 		HNS3_DEVARG_RX_FUNC_HINT "=vec|sve|simple|common "
 		HNS3_DEVARG_TX_FUNC_HINT "=vec|sve|simple|common ");
-RTE_LOG_REGISTER(hns3_logtype_init, pmd.net.hns3.init, NOTICE);
-RTE_LOG_REGISTER(hns3_logtype_driver, pmd.net.hns3.driver, NOTICE);
+RTE_LOG_REGISTER(hns3_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(hns3_logtype_driver, .driver, NOTICE);
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index fcf150e127..9e530890ff 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -12446,16 +12446,16 @@  i40e_cloud_filter_qinq_create(struct i40e_pf *pf)
 	return ret;
 }
 
-RTE_LOG_REGISTER(i40e_logtype_init, pmd.net.i40e.init, NOTICE);
-RTE_LOG_REGISTER(i40e_logtype_driver, pmd.net.i40e.driver, NOTICE);
+RTE_LOG_REGISTER(i40e_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(i40e_logtype_driver, .driver, NOTICE);
 #ifdef RTE_LIBRTE_I40E_DEBUG_RX
-RTE_LOG_REGISTER(i40e_logtype_rx, pmd.net.i40e.rx, DEBUG);
+RTE_LOG_REGISTER(i40e_logtype_rx, .rx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_I40E_DEBUG_TX
-RTE_LOG_REGISTER(i40e_logtype_tx, pmd.net.i40e.tx, DEBUG);
+RTE_LOG_REGISTER(i40e_logtype_tx, .tx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_I40E_DEBUG_TX_FREE
-RTE_LOG_REGISTER(i40e_logtype_tx_free, pmd.net.i40e.tx_free, DEBUG);
+RTE_LOG_REGISTER(i40e_logtype_tx_free, .tx_free, DEBUG);
 #endif
 
 RTE_PMD_REGISTER_PARAM_STRING(net_i40e,
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 869c4a1988..1a894e8ed6 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2350,14 +2350,14 @@  RTE_PMD_REGISTER_PCI(net_iavf, rte_iavf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_iavf, pci_id_iavf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_iavf, "* igb_uio | vfio-pci");
 RTE_PMD_REGISTER_PARAM_STRING(net_iavf, "cap=dcf");
-RTE_LOG_REGISTER(iavf_logtype_init, pmd.net.iavf.init, NOTICE);
-RTE_LOG_REGISTER(iavf_logtype_driver, pmd.net.iavf.driver, NOTICE);
+RTE_LOG_REGISTER(iavf_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(iavf_logtype_driver, .driver, NOTICE);
 #ifdef RTE_LIBRTE_IAVF_DEBUG_RX
-RTE_LOG_REGISTER(iavf_logtype_rx, pmd.net.iavf.rx, DEBUG);
+RTE_LOG_REGISTER(iavf_logtype_rx, .rx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_IAVF_DEBUG_TX
-RTE_LOG_REGISTER(iavf_logtype_tx, pmd.net.iavf.tx, DEBUG);
+RTE_LOG_REGISTER(iavf_logtype_tx, .tx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_IAVF_DEBUG_TX_FREE
-RTE_LOG_REGISTER(iavf_logtype_tx_free, pmd.net.iavf.tx_free, DEBUG);
+RTE_LOG_REGISTER(iavf_logtype_tx_free, .tx_free, DEBUG);
 #endif
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index f0dc543575..9c575af45b 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -5358,14 +5358,14 @@  RTE_PMD_REGISTER_PARAM_STRING(net_ice,
 			      ICE_SAFE_MODE_SUPPORT_ARG "=<0|1>"
 			      ICE_PIPELINE_MODE_SUPPORT_ARG "=<0|1>");
 
-RTE_LOG_REGISTER(ice_logtype_init, pmd.net.ice.init, NOTICE);
-RTE_LOG_REGISTER(ice_logtype_driver, pmd.net.ice.driver, NOTICE);
+RTE_LOG_REGISTER(ice_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(ice_logtype_driver, .driver, NOTICE);
 #ifdef RTE_LIBRTE_ICE_DEBUG_RX
-RTE_LOG_REGISTER(ice_logtype_rx, pmd.net.ice.rx, DEBUG);
+RTE_LOG_REGISTER(ice_logtype_rx, .rx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_ICE_DEBUG_TX
-RTE_LOG_REGISTER(ice_logtype_tx, pmd.net.ice.tx, DEBUG);
+RTE_LOG_REGISTER(ice_logtype_tx, .tx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_ICE_DEBUG_TX_FREE
-RTE_LOG_REGISTER(ice_logtype_tx_free, pmd.net.ice.tx_free, DEBUG);
+RTE_LOG_REGISTER(ice_logtype_tx_free, .tx_free, DEBUG);
 #endif
diff --git a/drivers/net/igc/igc_logs.c b/drivers/net/igc/igc_logs.c
index 2d458d7fb6..53eb977ab0 100644
--- a/drivers/net/igc/igc_logs.c
+++ b/drivers/net/igc/igc_logs.c
@@ -6,5 +6,5 @@ 
 
 #include "igc_logs.h"
 
-RTE_LOG_REGISTER(igc_logtype_init, pmd.net.igc.init, INFO);
-RTE_LOG_REGISTER(igc_logtype_driver, pmd.net.igc.driver, INFO);
+RTE_LOG_REGISTER(igc_logtype_init, .init, INFO);
+RTE_LOG_REGISTER(igc_logtype_driver, .driver, INFO);
diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index cffe899c07..f8954608ea 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -1293,4 +1293,4 @@  static struct rte_pci_driver rte_ionic_pmd = {
 RTE_PMD_REGISTER_PCI(net_ionic, rte_ionic_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ionic, pci_id_ionic_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_ionic, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(ionic_logtype, pmd.net.ionic, NOTICE);
+RTE_LOG_REGISTER(ionic_logtype, , NOTICE);
diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c b/drivers/net/ipn3ke/ipn3ke_ethdev.c
index e83bd92bac..bab40d999b 100644
--- a/drivers/net/ipn3ke/ipn3ke_ethdev.c
+++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c
@@ -583,4 +583,4 @@  static struct rte_afu_driver afu_ipn3ke_driver = {
 };
 
 RTE_PMD_REGISTER_AFU(net_ipn3ke_afu, afu_ipn3ke_driver);
-RTE_LOG_REGISTER(ipn3ke_afu_logtype, pmd.net.ipn3ke, NOTICE);
+RTE_LOG_REGISTER(ipn3ke_afu_logtype, , NOTICE);
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 31faff066c..05e882b5f6 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -8449,15 +8449,15 @@  RTE_PMD_REGISTER_KMOD_DEP(net_ixgbe_vf, "* igb_uio | vfio-pci");
 RTE_PMD_REGISTER_PARAM_STRING(net_ixgbe_vf,
 			      IXGBEVF_DEVARG_PFLINK_FULLCHK "=<0|1>");
 
-RTE_LOG_REGISTER(ixgbe_logtype_init, pmd.net.ixgbe.init, NOTICE);
-RTE_LOG_REGISTER(ixgbe_logtype_driver, pmd.net.ixgbe.driver, NOTICE);
+RTE_LOG_REGISTER(ixgbe_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(ixgbe_logtype_driver, .driver, NOTICE);
 
 #ifdef RTE_LIBRTE_IXGBE_DEBUG_RX
-RTE_LOG_REGISTER(ixgbe_logtype_rx, pmd.net.ixgbe.rx, DEBUG);
+RTE_LOG_REGISTER(ixgbe_logtype_rx, .rx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_IXGBE_DEBUG_TX
-RTE_LOG_REGISTER(ixgbe_logtype_tx, pmd.net.ixgbe.tx, DEBUG);
+RTE_LOG_REGISTER(ixgbe_logtype_tx, .tx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_IXGBE_DEBUG_TX_FREE
-RTE_LOG_REGISTER(ixgbe_logtype_tx_free, pmd.net.ixgbe.tx_free, DEBUG);
+RTE_LOG_REGISTER(ixgbe_logtype_tx_free, .tx_free, DEBUG);
 #endif
diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index 9ce74e549b..220468ab9d 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -68,7 +68,7 @@  static const struct rte_eth_link pmd_link = {
 };
 static int is_kni_initialized;
 
-RTE_LOG_REGISTER(eth_kni_logtype, pmd.net.kni, NOTICE);
+RTE_LOG_REGISTER(eth_kni_logtype, , NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, eth_kni_logtype, \
diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c
index 0b189d5d15..712caf882e 100644
--- a/drivers/net/liquidio/lio_ethdev.c
+++ b/drivers/net/liquidio/lio_ethdev.c
@@ -2168,5 +2168,5 @@  static struct rte_pci_driver rte_liovf_pmd = {
 RTE_PMD_REGISTER_PCI(net_liovf, rte_liovf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_liovf, pci_id_liovf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_liovf, "* igb_uio | vfio-pci");
-RTE_LOG_REGISTER(lio_logtype_init, pmd.net.liquidio.init, NOTICE);
-RTE_LOG_REGISTER(lio_logtype_driver, pmd.net.liquidio.driver, NOTICE);
+RTE_LOG_REGISTER(lio_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(lio_logtype_driver, .driver, NOTICE);
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 77c95bcb7a..262ef018ac 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -1878,4 +1878,4 @@  RTE_PMD_REGISTER_PARAM_STRING(net_memif,
 			      ETH_MEMIF_ZC_ARG "=yes|no"
 			      ETH_MEMIF_SECRET_ARG "=<string>");
 
-RTE_LOG_REGISTER(memif_logtype, pmd.net.memif, NOTICE);
+RTE_LOG_REGISTER(memif_logtype, , NOTICE);
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index d048d21033..4925d37fb3 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -1319,7 +1319,7 @@  mlx4_glue_init(void)
 #endif
 
 /* Initialize driver log type. */
-RTE_LOG_REGISTER(mlx4_logtype, pmd.net.mlx4, NOTICE)
+RTE_LOG_REGISTER(mlx4_logtype, , NOTICE)
 
 /**
  * Driver initialization routine.
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 3538cc8c20..2491761ec8 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2249,7 +2249,7 @@  static struct mlx5_pci_driver mlx5_driver = {
 };
 
 /* Initialize driver log type. */
-RTE_LOG_REGISTER(mlx5_logtype, pmd.net.mlx5, NOTICE)
+RTE_LOG_REGISTER(mlx5_logtype, , NOTICE)
 
 /**
  * Driver initialization routine.
diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c
index b0940b4462..d16ff656ef 100644
--- a/drivers/net/mvneta/mvneta_ethdev.c
+++ b/drivers/net/mvneta/mvneta_ethdev.c
@@ -987,4 +987,4 @@  static struct rte_vdev_driver pmd_mvneta_drv = {
 
 RTE_PMD_REGISTER_VDEV(net_mvneta, pmd_mvneta_drv);
 RTE_PMD_REGISTER_PARAM_STRING(net_mvneta, "iface=<ifc>");
-RTE_LOG_REGISTER(mvneta_logtype, pmd.net.mvneta, NOTICE);
+RTE_LOG_REGISTER(mvneta_logtype, , NOTICE);
diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 1d41788974..ff180a7682 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -3309,4 +3309,4 @@  static struct rte_vdev_driver pmd_mrvl_drv = {
 
 RTE_PMD_REGISTER_VDEV(net_mvpp2, pmd_mrvl_drv);
 RTE_PMD_REGISTER_ALIAS(net_mvpp2, eth_mvpp2);
-RTE_LOG_REGISTER(mrvl_logtype, pmd.net.mvpp2, NOTICE);
+RTE_LOG_REGISTER(mrvl_logtype, , NOTICE);
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 04904b1514..21afcc8d19 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -1294,8 +1294,8 @@  static struct rte_vmbus_driver rte_netvsc_pmd = {
 
 RTE_PMD_REGISTER_VMBUS(net_netvsc, rte_netvsc_pmd);
 RTE_PMD_REGISTER_KMOD_DEP(net_netvsc, "* uio_hv_generic");
-RTE_LOG_REGISTER(hn_logtype_init, pmd.net.netvsc.init, NOTICE);
-RTE_LOG_REGISTER(hn_logtype_driver, pmd.net.netvsc.driver, NOTICE);
+RTE_LOG_REGISTER(hn_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(hn_logtype_driver, .driver, NOTICE);
 RTE_PMD_REGISTER_PARAM_STRING(net_netvsc,
 			      NETVSC_ARG_LATENCY "=<uint32> "
 			      NETVSC_ARG_RXBREAK "=<uint32> "
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 888324cd20..fd8e3b993e 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -3847,8 +3847,8 @@  RTE_PMD_REGISTER_PCI_TABLE(net_nfp_pf, pci_id_nfp_pf_net_map);
 RTE_PMD_REGISTER_PCI_TABLE(net_nfp_vf, pci_id_nfp_vf_net_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_nfp_pf, "* igb_uio | uio_pci_generic | vfio");
 RTE_PMD_REGISTER_KMOD_DEP(net_nfp_vf, "* igb_uio | uio_pci_generic | vfio");
-RTE_LOG_REGISTER(nfp_logtype_init, pmd.net.nfp.init, NOTICE);
-RTE_LOG_REGISTER(nfp_logtype_driver, pmd.net.nfp.driver, NOTICE);
+RTE_LOG_REGISTER(nfp_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(nfp_logtype_driver, .driver, NOTICE);
 /*
  * Local variables:
  * c-file-style: "Linux"
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 32764e8f0e..c3e3b30592 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -73,7 +73,7 @@  static struct rte_eth_link pmd_link = {
 	.link_autoneg = ETH_LINK_FIXED,
 };
 
-RTE_LOG_REGISTER(eth_null_logtype, pmd.net.null, NOTICE);
+RTE_LOG_REGISTER(eth_null_logtype, , NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, eth_null_logtype, \
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 5836dbe09e..92b79ba9c7 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -47,9 +47,9 @@  enum octeontx_link_speed {
 	OCTEONTX_LINK_SPEED_RESERVE2
 };
 
-RTE_LOG_REGISTER(otx_net_logtype_mbox, pmd.net.octeontx.mbox, NOTICE);
-RTE_LOG_REGISTER(otx_net_logtype_init, pmd.net.octeontx.init, NOTICE);
-RTE_LOG_REGISTER(otx_net_logtype_driver, pmd.net.octeontx.driver, NOTICE);
+RTE_LOG_REGISTER(otx_net_logtype_mbox, .mbox, NOTICE);
+RTE_LOG_REGISTER(otx_net_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(otx_net_logtype_driver, .driver, NOTICE);
 
 /* Parse integer from integer argument */
 static int
diff --git a/drivers/net/octeontx_ep/otx_ep_ethdev.c b/drivers/net/octeontx_ep/otx_ep_ethdev.c
index b35c88b347..2f577335d2 100644
--- a/drivers/net/octeontx_ep/otx_ep_ethdev.c
+++ b/drivers/net/octeontx_ep/otx_ep_ethdev.c
@@ -463,4 +463,4 @@  static struct rte_pci_driver rte_otx_ep_pmd = {
 RTE_PMD_REGISTER_PCI(net_otx_ep, rte_otx_ep_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_otx_ep, pci_id_otx_ep_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_otx_ep, "* igb_uio | vfio-pci");
-RTE_LOG_REGISTER(otx_net_ep_logtype, pmd.net.octeontx_ep, NOTICE);
+RTE_LOG_REGISTER(otx_net_ep_logtype, , NOTICE);
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 28a5027315..0d00b73f71 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -148,7 +148,7 @@  static struct rte_eth_link pmd_link = {
 		.link_autoneg = ETH_LINK_FIXED,
 };
 
-RTE_LOG_REGISTER(eth_pcap_logtype, pmd.net.pcap, NOTICE);
+RTE_LOG_REGISTER(eth_pcap_logtype, , NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, eth_pcap_logtype, \
diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index 8cf59e210d..5d23d8e1c3 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -1177,4 +1177,4 @@  struct rte_vdev_driver pmd_pfe_drv = {
 
 RTE_PMD_REGISTER_VDEV(PFE_NAME_PMD, pmd_pfe_drv);
 RTE_PMD_REGISTER_PARAM_STRING(PFE_NAME_PMD, PFE_VDEV_GEM_ID_ARG "=<int> ");
-RTE_LOG_REGISTER(pfe_logtype_pmd, pmd.net.pfe, NOTICE);
+RTE_LOG_REGISTER(pfe_logtype_pmd, , NOTICE);
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 057a7b00e2..052bd24f97 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -2895,5 +2895,5 @@  RTE_PMD_REGISTER_KMOD_DEP(net_qede, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PCI(net_qede_vf, rte_qedevf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_qede_vf, pci_id_qedevf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_qede_vf, "* igb_uio | vfio-pci");
-RTE_LOG_REGISTER(qede_logtype_init, pmd.net.qede.init, NOTICE);
-RTE_LOG_REGISTER(qede_logtype_driver, pmd.net.qede.driver, NOTICE);
+RTE_LOG_REGISTER(qede_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(qede_logtype_driver, .driver, NOTICE);
diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index 02f6da2817..7ae0b69026 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -62,7 +62,7 @@  static struct rte_eth_link pmd_link = {
 	.link_autoneg = ETH_LINK_FIXED,
 };
 
-RTE_LOG_REGISTER(eth_ring_logtype, pmd.net.ring, NOTICE);
+RTE_LOG_REGISTER(eth_ring_logtype, , NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, eth_ring_logtype, \
diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c
index 0c2a79a7d2..79ab2b2788 100644
--- a/drivers/net/softnic/rte_eth_softnic.c
+++ b/drivers/net/softnic/rte_eth_softnic.c
@@ -80,7 +80,7 @@  static const struct softnic_conn_params conn_params_default = {
 	.msg_handle_arg = NULL,
 };
 
-RTE_LOG_REGISTER(pmd_softnic_logtype, pmd.net.softnic, NOTICE);
+RTE_LOG_REGISTER(pmd_softnic_logtype, , NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, pmd_softnic_logtype, \
diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c
index 6eaeadf1c8..f73f857b36 100644
--- a/drivers/net/szedata2/rte_eth_szedata2.c
+++ b/drivers/net/szedata2/rte_eth_szedata2.c
@@ -1949,5 +1949,5 @@  RTE_PMD_REGISTER_PCI(RTE_SZEDATA2_DRIVER_NAME, szedata2_eth_driver);
 RTE_PMD_REGISTER_PCI_TABLE(RTE_SZEDATA2_DRIVER_NAME, rte_szedata2_pci_id_table);
 RTE_PMD_REGISTER_KMOD_DEP(RTE_SZEDATA2_DRIVER_NAME,
 	"* combo6core & combov3 & szedata2 & ( szedata2_cv3 | szedata2_cv3_fdt )");
-RTE_LOG_REGISTER(szedata2_logtype_init, pmd.net.szedata2.init, NOTICE);
-RTE_LOG_REGISTER(szedata2_logtype_driver, pmd.net.szedata2.driver, NOTICE);
+RTE_LOG_REGISTER(szedata2_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(szedata2_logtype_driver, .driver, NOTICE);
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 68baa18523..5c9f395bc1 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -2568,4 +2568,4 @@  RTE_PMD_REGISTER_PARAM_STRING(net_tap,
 			      ETH_TAP_IFACE_ARG "=<string> "
 			      ETH_TAP_MAC_ARG "=" ETH_TAP_MAC_ARG_FMT " "
 			      ETH_TAP_REMOTE_ARG "=<string>");
-RTE_LOG_REGISTER(tap_logtype, pmd.net.tap, NOTICE);
+RTE_LOG_REGISTER(tap_logtype, , NOTICE);
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index c45d6e00a9..1b3bf7892e 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -51,9 +51,9 @@  static void nicvf_vf_stop(struct rte_eth_dev *dev, struct nicvf *nic,
 static int nicvf_vlan_offload_config(struct rte_eth_dev *dev, int mask);
 static int nicvf_vlan_offload_set(struct rte_eth_dev *dev, int mask);
 
-RTE_LOG_REGISTER(nicvf_logtype_mbox, pmd.net.thunderx.mbox, NOTICE);
-RTE_LOG_REGISTER(nicvf_logtype_init, pmd.net.thunderx.init, NOTICE);
-RTE_LOG_REGISTER(nicvf_logtype_driver, pmd.net.thunderx.driver, NOTICE);
+RTE_LOG_REGISTER(nicvf_logtype_mbox, .mbox, NOTICE);
+RTE_LOG_REGISTER(nicvf_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(nicvf_logtype_driver, .driver, NOTICE);
 
 static void
 nicvf_link_status_update(struct nicvf *nic,
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 97796f040b..524e992d26 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -5337,17 +5337,17 @@  RTE_PMD_REGISTER_PARAM_STRING(net_txgbe,
 			      TXGBE_DEVARG_FFE_PRE "=<uint16>"
 			      TXGBE_DEVARG_FFE_POST "=<uint16>");
 
-RTE_LOG_REGISTER(txgbe_logtype_init, pmd.net.txgbe.init, NOTICE);
-RTE_LOG_REGISTER(txgbe_logtype_driver, pmd.net.txgbe.driver, NOTICE);
-RTE_LOG_REGISTER(txgbe_logtype_bp, pmd.net.txgbe.bp, NOTICE);
+RTE_LOG_REGISTER(txgbe_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(txgbe_logtype_driver, .driver, NOTICE);
+RTE_LOG_REGISTER(txgbe_logtype_bp, .bp, NOTICE);
 
 #ifdef RTE_LIBRTE_TXGBE_DEBUG_RX
-	RTE_LOG_REGISTER(txgbe_logtype_rx, pmd.net.txgbe.rx, DEBUG);
+	RTE_LOG_REGISTER(txgbe_logtype_rx, .rx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_TXGBE_DEBUG_TX
-	RTE_LOG_REGISTER(txgbe_logtype_tx, pmd.net.txgbe.tx, DEBUG);
+	RTE_LOG_REGISTER(txgbe_logtype_tx, .tx, DEBUG);
 #endif
 
 #ifdef RTE_LIBRTE_TXGBE_DEBUG_TX_FREE
-	RTE_LOG_REGISTER(txgbe_logtype_tx_free, pmd.net.txgbe.tx_free, DEBUG);
+	RTE_LOG_REGISTER(txgbe_logtype_tx_free, .tx_free, DEBUG);
 #endif
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index c1b7099717..1d622dabd0 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -48,7 +48,7 @@ 
 #define NETVSC_CLASS_ID "{f8615163-df3e-46c5-913f-f2d2f965ed0e}"
 #define NETVSC_MAX_ROUTE_LINE_SIZE 300
 
-RTE_LOG_REGISTER(vdev_netvsc_logtype, pmd.net.vdev_netvsc, NOTICE);
+RTE_LOG_REGISTER(vdev_netvsc_logtype, , NOTICE);
 
 #define DRV_LOG(level, ...) \
 	rte_log(RTE_LOG_ ## level, \
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index d198fc8a8e..d1e45cd9ba 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -19,7 +19,7 @@ 
 
 #include "rte_eth_vhost.h"
 
-RTE_LOG_REGISTER(vhost_logtype, pmd.net.vhost, NOTICE);
+RTE_LOG_REGISTER(vhost_logtype, , NOTICE);
 
 #define VHOST_LOG(level, ...) \
 	rte_log(RTE_LOG_ ## level, vhost_logtype, __VA_ARGS__)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 090d94615e..67fc562f27 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2483,5 +2483,5 @@  __rte_unused uint8_t is_rx)
 	return 0;
 }
 
-RTE_LOG_REGISTER(virtio_logtype_init, pmd.net.virtio.init, NOTICE);
-RTE_LOG_REGISTER(virtio_logtype_driver, pmd.net.virtio.driver, NOTICE);
+RTE_LOG_REGISTER(virtio_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(virtio_logtype_driver, .driver, NOTICE);
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index d1a313bfc4..07364016d2 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -1491,5 +1491,5 @@  vmxnet3_interrupt_handler(void *param)
 RTE_PMD_REGISTER_PCI(net_vmxnet3, rte_vmxnet3_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_vmxnet3, pci_id_vmxnet3_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_vmxnet3, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(vmxnet3_logtype_init, pmd.net.vmxnet3.init, NOTICE);
-RTE_LOG_REGISTER(vmxnet3_logtype_driver, pmd.net.vmxnet3.driver, NOTICE);
+RTE_LOG_REGISTER(vmxnet3_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(vmxnet3_logtype_driver, .driver, NOTICE);
diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index d9a46ef915..5aaa282cbb 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -1611,7 +1611,7 @@  static struct rte_pci_driver rte_ifpga_rawdev_pmd = {
 RTE_PMD_REGISTER_PCI(ifpga_rawdev_pci_driver, rte_ifpga_rawdev_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(ifpga_rawdev_pci_driver, rte_ifpga_rawdev_pmd);
 RTE_PMD_REGISTER_KMOD_DEP(ifpga_rawdev_pci_driver, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(ifpga_rawdev_logtype, pmd.raw.ifpga, NOTICE);
+RTE_LOG_REGISTER(ifpga_rawdev_logtype, , NOTICE);
 
 static const char * const valid_args[] = {
 #define IFPGA_ARG_NAME         "ifpga"
diff --git a/drivers/raw/ioat/ioat_rawdev.c b/drivers/raw/ioat/ioat_rawdev.c
index 15af07017c..759b7823f2 100644
--- a/drivers/raw/ioat/ioat_rawdev.c
+++ b/drivers/raw/ioat/ioat_rawdev.c
@@ -28,7 +28,7 @@  static struct rte_pci_driver ioat_pmd_drv;
 #define IOAT_DEVICE_ID_BDXF	0x6f2F
 #define IOAT_DEVICE_ID_ICX	0x0b00
 
-RTE_LOG_REGISTER(ioat_pmd_logtype, pmd.raw.ioat, INFO);
+RTE_LOG_REGISTER(ioat_pmd_logtype, , INFO);
 
 #define DESC_SZ sizeof(struct rte_ioat_generic_hw_desc)
 #define COMPLETION_SZ sizeof(__m128i)
diff --git a/drivers/raw/ntb/ntb.c b/drivers/raw/ntb/ntb.c
index 6dd213ef6e..34173c90ed 100644
--- a/drivers/raw/ntb/ntb.c
+++ b/drivers/raw/ntb/ntb.c
@@ -1534,4 +1534,4 @@  static struct rte_pci_driver rte_ntb_pmd = {
 RTE_PMD_REGISTER_PCI(raw_ntb, rte_ntb_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(raw_ntb, pci_id_ntb_map);
 RTE_PMD_REGISTER_KMOD_DEP(raw_ntb, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(ntb_logtype, pmd.raw.ntb, INFO);
+RTE_LOG_REGISTER(ntb_logtype, , INFO);
diff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleton/skeleton_rawdev.c
index 8896f0c9c5..32d984294d 100644
--- a/drivers/raw/skeleton/skeleton_rawdev.c
+++ b/drivers/raw/skeleton/skeleton_rawdev.c
@@ -768,4 +768,4 @@  static struct rte_vdev_driver skeleton_pmd_drv = {
 };
 
 RTE_PMD_REGISTER_VDEV(SKELETON_PMD_RAWDEV_NAME, skeleton_pmd_drv);
-RTE_LOG_REGISTER(skeleton_pmd_logtype, pmd.raw.skeleton, INFO);
+RTE_LOG_REGISTER(skeleton_pmd_logtype, , INFO);
diff --git a/drivers/regex/mlx5/mlx5_regex.c b/drivers/regex/mlx5/mlx5_regex.c
index 82c485e50c..a4eacfc844 100644
--- a/drivers/regex/mlx5/mlx5_regex.c
+++ b/drivers/regex/mlx5/mlx5_regex.c
@@ -20,7 +20,6 @@ 
 #include "mlx5_rxp_csrs.h"
 
 #define MLX5_REGEX_DRIVER_NAME regex_mlx5
-#define MLX5_REGEX_LOG_NAME    pmd.regex.mlx5
 
 int mlx5_regex_logtype;
 
@@ -301,7 +300,7 @@  RTE_INIT(rte_mlx5_regex_init)
 		mlx5_pci_driver_register(&mlx5_regex_driver);
 }
 
-RTE_LOG_REGISTER(mlx5_regex_logtype, MLX5_REGEX_LOG_NAME, NOTICE)
+RTE_LOG_REGISTER(mlx5_regex_logtype, , NOTICE)
 RTE_PMD_EXPORT_NAME(MLX5_REGEX_DRIVER_NAME, __COUNTER__);
 RTE_PMD_REGISTER_PCI_TABLE(MLX5_REGEX_DRIVER_NAME, mlx5_regex_pci_id_map);
 RTE_PMD_REGISTER_KMOD_DEP(MLX5_REGEX_DRIVER_NAME, "* ib_uverbs & mlx5_core & mlx5_ib");
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
index 898e50f807..197e2237f4 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
@@ -869,7 +869,7 @@  static struct mlx5_pci_driver mlx5_vdpa_driver = {
 	},
 };
 
-RTE_LOG_REGISTER(mlx5_vdpa_logtype, pmd.vdpa.mlx5, NOTICE)
+RTE_LOG_REGISTER(mlx5_vdpa_logtype, , NOTICE)
 
 /**
  * Driver initialization routine.
diff --git a/lib/librte_bbdev/rte_bbdev.c b/lib/librte_bbdev/rte_bbdev.c
index 5ba891c232..107e421a67 100644
--- a/lib/librte_bbdev/rte_bbdev.c
+++ b/lib/librte_bbdev/rte_bbdev.c
@@ -29,7 +29,7 @@ 
 
 
 /* BBDev library logging ID */
-RTE_LOG_REGISTER(bbdev_logtype, lib.bbdev, NOTICE);
+RTE_LOG_REGISTER(bbdev_logtype, , NOTICE);
 
 /* Helper macro for logging */
 #define rte_bbdev_log(level, fmt, ...) \
diff --git a/lib/librte_bpf/bpf.c b/lib/librte_bpf/bpf.c
index 8d15885bc4..a00685d73e 100644
--- a/lib/librte_bpf/bpf.c
+++ b/lib/librte_bpf/bpf.c
@@ -53,4 +53,4 @@  bpf_jit(struct rte_bpf *bpf)
 	return rc;
 }
 
-RTE_LOG_REGISTER(rte_bpf_logtype, lib.bpf, INFO);
+RTE_LOG_REGISTER(rte_bpf_logtype, , INFO);
diff --git a/lib/librte_cfgfile/rte_cfgfile.c b/lib/librte_cfgfile/rte_cfgfile.c
index 002022263e..cf5ffb263c 100644
--- a/lib/librte_cfgfile/rte_cfgfile.c
+++ b/lib/librte_cfgfile/rte_cfgfile.c
@@ -27,7 +27,7 @@  struct rte_cfgfile {
 	struct rte_cfgfile_section *sections;
 };
 
-RTE_LOG_REGISTER(cfgfile_logtype, lib.cfgfile, INFO);
+RTE_LOG_REGISTER(cfgfile_logtype, , INFO);
 
 #define CFG_LOG(level, fmt, args...)					\
 	rte_log(RTE_LOG_ ## level, cfgfile_logtype, "%s(): " fmt "\n",	\
diff --git a/lib/librte_compressdev/rte_compressdev.c b/lib/librte_compressdev/rte_compressdev.c
index 49a342f400..5ed75b3ec5 100644
--- a/lib/librte_compressdev/rte_compressdev.c
+++ b/lib/librte_compressdev/rte_compressdev.c
@@ -763,4 +763,4 @@  rte_compressdev_name_get(uint8_t dev_id)
 	return dev->data->name;
 }
 
-RTE_LOG_REGISTER(compressdev_logtype, lib.compressdev, NOTICE);
+RTE_LOG_REGISTER(compressdev_logtype, , NOTICE);
diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c
index bed83a402a..01dd63119e 100644
--- a/lib/librte_eal/common/eal_common_log.c
+++ b/lib/librte_eal/common/eal_common_log.c
@@ -14,6 +14,7 @@ 
 #include <rte_eal.h>
 #include <rte_log.h>
 #include <rte_per_lcore.h>
+#include <rte_string_fns.h>
 
 #include "eal_log.h"
 
@@ -266,6 +267,44 @@  int rte_log_cur_msg_logtype(void)
 	return RTE_PER_LCORE(log_cur_msg).logtype;
 }
 
+int rte_log_logtype_from_file(char *logtype, size_t size, const char *file,
+	const char *suffix)
+{
+	char pattern[PATH_MAX];
+	const char *prefix;
+	char *start;
+	char *pos;
+	int ret;
+
+	strlcpy(pattern, file, sizeof(pattern));
+	if ((pos = strstr(pattern, "drivers/")) != NULL) {
+		start = pos + strlen("drivers/");
+		pos = strstr(start, "/");
+		if (pos == NULL)
+			return -1;
+		pos[0] = '.';
+		pos = strstr(pos + 1, "/");
+		if (pos == NULL)
+			return -1;
+		pos[0] = '\0';
+		prefix = "pmd.";
+	} else if ((pos = strstr(pattern, "lib/librte_")) != NULL) {
+		start = pos + strlen("lib/librte_");
+		pos = strstr(start, "/");
+		if (pos == NULL)
+			return -1;
+		pos[0] = '\0';
+		prefix = "lib.";
+	} else {
+		return -1;
+	}
+	ret = snprintf(logtype, size, "%s%s%s", prefix, start,
+		suffix != NULL ? suffix : "");
+	if (ret < 0 || (unsigned int)ret >= size)
+		return -1;
+	return 0;
+}
+
 static int
 log_lookup(const char *name)
 {
diff --git a/lib/librte_eal/include/rte_log.h b/lib/librte_eal/include/rte_log.h
index a1c608ab41..5d7cb15cd0 100644
--- a/lib/librte_eal/include/rte_log.h
+++ b/lib/librte_eal/include/rte_log.h
@@ -373,6 +373,29 @@  int rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap)
 		 RTE_LOGTYPE_ ## t, # t ": " __VA_ARGS__) :	\
 	 0)
 
+/*
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice
+ *
+ * Generates a log type based on the file which calls RTE_LOG_REGISTER and an
+ * optional suffix.
+ *
+ * @param logtype
+ *   A buffer where this helper writes the log type.
+ * @param size
+ *   The size of the logtype buffer.
+ * @param file
+ *   The file which called RTE_LOG_REGISTER.
+ * @param suffix
+ *   If not NULL, a suffix to append to the log type.
+ * @return
+ *   - 0: Success.
+ *   - Negative on error, the logtype content is invalid.
+ */
+__rte_experimental
+int rte_log_logtype_from_file(char *logtype, size_t size, const char *file,
+	const char *suffix);
+
 /**
  * @warning
  * @b EXPERIMENTAL: this API may change without prior notice
@@ -384,17 +407,27 @@  int rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap)
  *
  * @param type
  *   The log type identifier
- * @param name
- *    Name for the log type to be registered
+ * @param suffix
+ *    Name for the log type to be registered.
+ *    If empty or starts with a ., then this name is used as a suffix appended
+ *    to the default logtype for the current file
+ *    (see rte_log_logtype_from_file).
  * @param level
  *   Log level. A value between EMERG (1) and DEBUG (8).
  */
-#define RTE_LOG_REGISTER(type, name, level)				\
+#define RTE_LOG_REGISTER(type, suffix, level)				\
 int type;								\
 RTE_INIT(__##type)							\
 {									\
-	type = rte_log_register_type_and_pick_level(RTE_STR(name),	\
-						    RTE_LOG_##level);	\
+	const char *name = RTE_STR(suffix);                             \
+	char pattern[PATH_MAX];                                         \
+	if (name[0] == '\0' || name[0] == '.') {                        \
+		if (rte_log_logtype_from_file(pattern, sizeof(pattern), \
+				__FILE__, name) == 0)                   \
+			name = pattern;                                 \
+	}                                                               \
+	type = rte_log_register_type_and_pick_level(name,               \
+						    RTE_LOG_##level);   \
 	if (type < 0)                                                   \
 		type = RTE_LOGTYPE_EAL;                                 \
 }
diff --git a/lib/librte_eal/version.map b/lib/librte_eal/version.map
index e7217ae288..71c2c2444c 100644
--- a/lib/librte_eal/version.map
+++ b/lib/librte_eal/version.map
@@ -412,6 +412,7 @@  EXPERIMENTAL {
 	# added in 21.05
 	rte_intr_callback_unregister_sync;
 	rte_log_list_types;
+	rte_log_logtype_from_file;
 	rte_thread_key_create;
 	rte_thread_key_delete;
 	rte_thread_value_get;
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 3059aa55b3..98b4db081b 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -5923,7 +5923,7 @@  rte_eth_representor_info_get(uint16_t port_id,
 								      info));
 }
 
-RTE_LOG_REGISTER(rte_eth_dev_logtype, lib.ethdev, INFO);
+RTE_LOG_REGISTER(rte_eth_dev_logtype, , INFO);
 
 RTE_INIT(ethdev_init_telemetry)
 {
diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c
index dd7b83087d..44f062abb8 100644
--- a/lib/librte_eventdev/rte_event_timer_adapter.c
+++ b/lib/librte_eventdev/rte_event_timer_adapter.c
@@ -29,9 +29,9 @@ 
 #define DATA_MZ_NAME_MAX_LEN 64
 #define DATA_MZ_NAME_FORMAT "rte_event_timer_adapter_data_%d"
 
-RTE_LOG_REGISTER(evtim_logtype, lib.eventdev.adapter.timer, NOTICE);
-RTE_LOG_REGISTER(evtim_buffer_logtype, lib.eventdev.adapter.timer, NOTICE);
-RTE_LOG_REGISTER(evtim_svc_logtype, lib.eventdev.adapter.timer.svc, NOTICE);
+RTE_LOG_REGISTER(evtim_logtype, .adapter.timer, NOTICE);
+RTE_LOG_REGISTER(evtim_buffer_logtype, .adapter.timer, NOTICE);
+RTE_LOG_REGISTER(evtim_svc_logtype, .adapter.timer.svc, NOTICE);
 
 static struct rte_event_timer_adapter adapters[RTE_EVENT_TIMER_ADAPTER_NUM_MAX];
 
diff --git a/lib/librte_flow_classify/rte_flow_classify.c b/lib/librte_flow_classify/rte_flow_classify.c
index 639b0051f5..fd829e52d9 100644
--- a/lib/librte_flow_classify/rte_flow_classify.c
+++ b/lib/librte_flow_classify/rte_flow_classify.c
@@ -667,4 +667,4 @@  rte_flow_classifier_query(struct rte_flow_classifier *cls,
 	return ret;
 }
 
-RTE_LOG_REGISTER(librte_flow_classify_logtype, lib.flow_classify, INFO);
+RTE_LOG_REGISTER(librte_flow_classify_logtype, , INFO);
diff --git a/lib/librte_graph/graph.c b/lib/librte_graph/graph.c
index 7224b00a7d..a7b458ef69 100644
--- a/lib/librte_graph/graph.c
+++ b/lib/librte_graph/graph.c
@@ -578,4 +578,4 @@  rte_graph_max_count(void)
 	return graph_id;
 }
 
-RTE_LOG_REGISTER(rte_graph_logtype, lib.graph, INFO);
+RTE_LOG_REGISTER(rte_graph_logtype, , INFO);
diff --git a/lib/librte_member/rte_member.c b/lib/librte_member/rte_member.c
index 4696c0f171..43c3a8314c 100644
--- a/lib/librte_member/rte_member.c
+++ b/lib/librte_member/rte_member.c
@@ -297,4 +297,4 @@  rte_member_reset(const struct rte_member_setsum *setsum)
 	}
 }
 
-RTE_LOG_REGISTER(librte_member_logtype, lib.member, DEBUG);
+RTE_LOG_REGISTER(librte_member_logtype, , DEBUG);
diff --git a/lib/librte_metrics/rte_metrics_telemetry.c b/lib/librte_metrics/rte_metrics_telemetry.c
index c24990d923..c8054d43f2 100644
--- a/lib/librte_metrics/rte_metrics_telemetry.c
+++ b/lib/librte_metrics/rte_metrics_telemetry.c
@@ -528,7 +528,7 @@  handle_ports_stats_values_by_name(const char *cmd __rte_unused,
 	return used;
 }
 
-RTE_LOG_REGISTER(metrics_log_level, lib.metrics, ERR);
+RTE_LOG_REGISTER(metrics_log_level, , ERR);
 
 RTE_INIT(metrics_ctor)
 {
diff --git a/lib/librte_net/rte_net_crc.c b/lib/librte_net/rte_net_crc.c
index 1fe58f7c75..6c3ee835d1 100644
--- a/lib/librte_net/rte_net_crc.c
+++ b/lib/librte_net/rte_net_crc.c
@@ -76,7 +76,7 @@  static uint16_t max_simd_bitwidth;
 	rte_log(RTE_LOG_ ## level, libnet_logtype, "%s(): " fmt "\n",	\
 		__func__, ## args)
 
-RTE_LOG_REGISTER(libnet_logtype, lib.net, INFO);
+RTE_LOG_REGISTER(libnet_logtype, , INFO);
 
 /* Scalar handling */
 
diff --git a/lib/librte_node/log.c b/lib/librte_node/log.c
index f14199f07c..e4621b15c6 100644
--- a/lib/librte_node/log.c
+++ b/lib/librte_node/log.c
@@ -4,4 +4,4 @@ 
 
 #include "node_private.h"
 
-RTE_LOG_REGISTER(rte_node_logtype, lib.node, INFO);
+RTE_LOG_REGISTER(rte_node_logtype, , INFO);
diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c
index d20e944e04..ffe32912a3 100644
--- a/lib/librte_pdump/rte_pdump.c
+++ b/lib/librte_pdump/rte_pdump.c
@@ -12,7 +12,7 @@ 
 
 #include "rte_pdump.h"
 
-RTE_LOG_REGISTER(pdump_logtype, lib.pdump, NOTICE);
+RTE_LOG_REGISTER(pdump_logtype, , NOTICE);
 
 /* Macro for printing using RTE_LOG */
 #define PDUMP_LOG(level, fmt, args...)				\
diff --git a/lib/librte_rawdev/rte_rawdev.c b/lib/librte_rawdev/rte_rawdev.c
index f29164dd15..2905694fb4 100644
--- a/lib/librte_rawdev/rte_rawdev.c
+++ b/lib/librte_rawdev/rte_rawdev.c
@@ -627,7 +627,7 @@  handle_dev_xstats(const char *cmd __rte_unused,
 	return 0;
 }
 
-RTE_LOG_REGISTER(librawdev_logtype, lib.rawdev, INFO);
+RTE_LOG_REGISTER(librawdev_logtype, , INFO);
 
 RTE_INIT(librawdev_init_telemetry)
 {
diff --git a/lib/librte_rcu/rte_rcu_qsbr.c b/lib/librte_rcu/rte_rcu_qsbr.c
index a5f9de3267..64b9202049 100644
--- a/lib/librte_rcu/rte_rcu_qsbr.c
+++ b/lib/librte_rcu/rte_rcu_qsbr.c
@@ -496,4 +496,4 @@  rte_rcu_qsbr_dq_delete(struct rte_rcu_qsbr_dq *dq)
 	return 0;
 }
 
-RTE_LOG_REGISTER(rte_rcu_log_type, lib.rcu, ERR);
+RTE_LOG_REGISTER(rte_rcu_log_type, , ERR);
diff --git a/lib/librte_stack/rte_stack.c b/lib/librte_stack/rte_stack.c
index 8a51fba17f..3f4af877a9 100644
--- a/lib/librte_stack/rte_stack.c
+++ b/lib/librte_stack/rte_stack.c
@@ -192,4 +192,4 @@  rte_stack_lookup(const char *name)
 	return r;
 }
 
-RTE_LOG_REGISTER(stack_logtype, lib.stack, NOTICE);
+RTE_LOG_REGISTER(stack_logtype, , NOTICE);
diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index c9d1371e45..98ca1370e8 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -1741,5 +1741,5 @@  int rte_vhost_async_channel_unregister(int vid, uint16_t queue_id)
 	return ret;
 }
 
-RTE_LOG_REGISTER(vhost_config_log_level, lib.vhost.config, INFO);
-RTE_LOG_REGISTER(vhost_data_log_level, lib.vhost.data, WARNING);
+RTE_LOG_REGISTER(vhost_config_log_level, .config, INFO);
+RTE_LOG_REGISTER(vhost_data_log_level, .data, WARNING);