We're preparing the upgrade to GitLab 10! Preview the new UI: http://cern.ch/go/8stB

Commit 5f8ebd44 by Sebastien Ponce

Adapted DLF logging to new logging initialization

parent baff597c
......@@ -62,8 +62,8 @@ int main(int argc, char *argv[]) {
}
// Instantiate daemon and thread pools
castor::log::SyslogLogger log("srmbed");
castor::srm::daemon::SrmDaemon daemon(std::cout, std::cerr, log);
castor::log::init(new castor::log::SyslogLogger("srmbed"));
castor::srm::daemon::SrmDaemon daemon(std::cout, std::cerr);
castor::srm::CastorClient* cc = new castor::srm::CastorClient(consts->beCallbackPort());
daemon.addThreadPool(
......@@ -112,9 +112,8 @@ int main(int argc, char *argv[]) {
//------------------------------------------------------------------------------
// Constructor
//------------------------------------------------------------------------------
castor::srm::daemon::SrmDaemon::SrmDaemon(std::ostream &stdOut, std::ostream &stdErr,
castor::log::Logger &log) :
castor::server::MultiThreadedDaemon(stdOut, stdErr, log)
castor::srm::daemon::SrmDaemon::SrmDaemon(std::ostream &stdOut, std::ostream &stdErr) :
castor::server::MultiThreadedDaemon(stdOut, stdErr)
{
castor::log::write(DLF_LVL_SYSTEM, "SrmDaemon started");
}
......
......@@ -47,10 +47,8 @@ namespace castor {
* Constructor
* @param stdOut Stream representing standard out.
* @param stdErr Stream representing standard error.
* @param log Object representing the API of the CASTOR logging
* system.
*/
SrmDaemon(std::ostream &stdOut, std::ostream &stdErr, castor::log::Logger &log);
SrmDaemon(std::ostream &stdOut, std::ostream &stdErr);
/**
* Destructor
......
......@@ -50,8 +50,8 @@
//------------------------------------------------------------------------------
int main(int argc, char *argv[]) {
try {
castor::log::SyslogLogger log("srmfed");
castor::srm::server::SrmServer server(std::cout, std::cerr, log);
castor::log::init(new castor::log::SyslogLogger("srmfed"));
castor::srm::server::SrmServer server(std::cout, std::cerr);
// Parse arguments and reads config file
server.parseCommandLine(argc, argv);
......@@ -106,9 +106,8 @@ int main(int argc, char *argv[]) {
//------------------------------------------------------------------------------
// Constructor
//------------------------------------------------------------------------------
castor::srm::server::SrmServer::SrmServer(std::ostream &stdOut, std::ostream &stdErr,
castor::log::Logger &log) :
castor::server::MultiThreadedDaemon(stdOut, stdErr, log) {
castor::srm::server::SrmServer::SrmServer(std::ostream &stdOut, std::ostream &stdErr) :
castor::server::MultiThreadedDaemon(stdOut, stdErr) {
castor::log::write(DLF_LVL_SYSTEM, "SrmServer started");
}
......
......@@ -48,10 +48,8 @@ namespace castor {
* Constructor
* @param stdOut Stream representing standard out.
* @param stdErr Stream representing standard error.
* @param log Object representing the API of the CASTOR logging
* system.
*/
SrmServer(std::ostream &stdOut, std::ostream &stdErr, castor::log::Logger &log);
SrmServer(std::ostream &stdOut, std::ostream &stdErr);
/**
* Destructor
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment