Skip to content

Getting number of active indices #180

@WurmPeter

Description

@WurmPeter

Hello Gergely,

Recently I had the need to be able to remove logging to file (index 2) IF EXISTS. logger::delete_logger_index needs an index, so I had to use a internal function to be able to get the number of active indices first:

loggers <- get(logger:::fallback_namespace("global"), envir = logger:::namespaces)
logger_indices <- length(loggers)

Are you open for a PR to include a little public function that just returns the number of current indices (logger_indices)? Or is it just better to change fallback_namespace so it's a public available function?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions