Skip to content
Snippets Groups Projects
Commit e1ab8b87 authored by Michael Davis's avatar Michael Davis
Browse files

[cta-admin] Sets log level from environment variables

parent 8f580dc7
Branches
Tags
No related merge requests found
......@@ -153,9 +153,16 @@ void CtaAdminCmd::send() const
// Set configuration options
XrdSsiPb::Config config;
config.set("response_bufsize", StreamBufferSize);
config.set("request_timeout", DefaultRequestTimeout);
config.getEnv("request_timeout", "XRD_REQUESTTIMEOUT");
config.set("response_bufsize", StreamBufferSize); // default value = 1024 bytes
config.set("request_timeout", DefaultRequestTimeout); // default value = 10s
config.getEnv("request_timeout", "XRD_REQUESTTIMEOUT"); // environment variable can override default
// If XRDDEBUG=1, switch on all logging
if(getenv("XRDDEBUG")) {
config.set("log", "all");
}
// If fine-grained control over log level is required, use XrdSsiPbLogLevel
config.getEnv("log", "XrdSsiPbLogLevel");
// Obtain a Service Provider
XrdSsiPbServiceType cta_service(endpoint, Resource, config);
......
Subproject commit abdb133901fb9451a27e941910a5a2228117ce99
Subproject commit d37262d05c46e8d420f3b38b7b929a36a6056b9f
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment