ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Logger.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Logger.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2016-2018 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
10 
11 namespace Acts {
12 
13 std::unique_ptr<const Logger> getDefaultLogger(const std::string& name,
14  const Logging::Level& lvl,
15  std::ostream* log_stream) {
16  using namespace Logging;
17  auto output = std::make_unique<LevelOutputDecorator>(
18  std::make_unique<NamedOutputDecorator>(
19  std::make_unique<TimedOutputDecorator>(
20  std::make_unique<DefaultPrintPolicy>(log_stream)),
21  name));
22  auto print = std::make_unique<DefaultFilterPolicy>(lvl);
23  return std::make_unique<const Logger>(std::move(output), std::move(print));
24 }
25 } // namespace Acts