Teamcenter C++ API Reference  2312
TcLogManager.hxx
Go to the documentation of this file.
1 // Copyright 2022 Siemens Digital Industries Software
2 // ==================================================
3 // Copyright 2022.
4 // Siemens Product Lifecycle Management Software Inc.
5 // All Rights Reserved.
6 // ==================================================
7 // Copyright 2022 Siemens Digital Industries Software
8 
9 #ifndef TEAMCENTER_COMMON_LOGGING_TCLOGMANAGER_HXX
10 #define TEAMCENTER_COMMON_LOGGING_TCLOGMANAGER_HXX
11 
12 #include <tclogging/Appender.hxx>
13 #include <tclogging/Logger.hxx>
14 
15 #include <string>
16 #include <vector>
17 
18 #include <tclogging/libtclogging_exports.h>
19 namespace Teamcenter{ namespace Soa { namespace Client { class Logger; }}}
20 
21 namespace Teamcenter::Common::Logging
22 {
23 
28  class TCLOGGING_API TcLogManager
29  {
30  public:
31 
41  static Logger* getLogger( const std::string& name );
42 
57  static void addLogger( const std::string& name, Appender* appender, LogLevel level );
58 
59 
60 
61  virtual ~TcLogManager() = default;
62  TcLogManager() = delete;
63  TcLogManager( const TcLogManager& ) = delete;
64  TcLogManager( TcLogManager&& ) = delete;
65  TcLogManager& operator=( const TcLogManager& ) = delete;
66  TcLogManager& operator=( TcLogManager&& ) = delete;
67 
68  private:
69  friend class Teamcenter::Soa::Client::Logger;
70 
71  static std::vector<std::string> getSubString( std::string inputStr );
72  static Logger* getParent( std::string loggerName );
73  static void updateChildLoggers( const std::string& name, Appender* appender, LogLevel level );
74 
79  static void clearLoggers();
80  };
81 
82 }
83 
84 #include <tclogging/libtclogging_undef.h>
85 #endif