Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data_transfer_log_level only supports LOG_NOTICE and LOG_DEBUG #282

Open
alanking opened this issue Dec 5, 2024 · 1 comment
Open

data_transfer_log_level only supports LOG_NOTICE and LOG_DEBUG #282

alanking opened this issue Dec 5, 2024 · 1 comment

Comments

@alanking
Copy link
Contributor

alanking commented Dec 5, 2024

If the configuration value string is anything other than "LOG_NOTICE", it will remain at the default level of LOG_DEBUG.

Here's the default value:

const std::string data_transfer_log_level_key{"data_transfer_log_level"};
int data_transfer_log_level_value{LOG_DEBUG};

And here's where we are overriding the value in configuration:

if(plugin_spec_cfg.find(data_transfer_log_level_key) != plugin_spec_cfg.end()) {
const std::string& val = plugin_spec_cfg.at(data_transfer_log_level_key).get_ref<const std::string&>();
if("LOG_NOTICE" == val) {
data_transfer_log_level_value = LOG_NOTICE;
}
}

We are using the LOG_<level> semantics of the legacy iRODS logging. We might want to change these strings to be like our new logging system (i.e. "trace", "debug", "info", "warn", "error"). In fact, we might want to consider creating a log category for this plugin...

@korydraughn
Copy link
Collaborator

A dedicated log category sounds great. That'll be a great help to admins and devs needing to debug the plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants