LogManager.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: Core
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2011, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 #pragma once
14 
15 #include "CeeCore/Base.h"
16 #include "CeeCore/RefCountedObject.h"
17 #include "CeeCore/Str.h"
18 
19 namespace cvf {
20 class LogManager;
21 }
22 
23 namespace cee {
24 
25 class LogDestination;
26 class CodeLocation;
27 
28 //==================================================================================================
29 //
30 //
31 //
32 //==================================================================================================
33 class CEE_CORE_EXPORT LogManager : public RefCountedObject
34 {
35 public:
36  virtual ~LogManager();
37 
38  void setLevel(const Str& loggerName, int logLevel);
39  void setDestination(LogDestination* logDestination);
40 
41  void logError(const Str& loggerName, const Str& errorMessage);
42  void logError(const Str& loggerName, const Str& errorMessage, const CodeLocation& location);
43  void logWarning(const Str& loggerName, const Str& warningMessage);
44  void logWarning(const Str& loggerName, const Str& warningMessage, const CodeLocation& location);
45  void logInfo(const Str& loggerName, const Str& infoMessage);
46  void logInfo(const Str& loggerName, const Str& infoMessage, const CodeLocation& location);
47  void logDebug(const Str& loggerName, const Str& debugMessage);
48  void logDebug(const Str& loggerName, const Str& debugMessage, const CodeLocation& location);
49 
50  void logInfoForced(const Str& loggerName, const Str& infoMessage);
51 
52 public:
53  cvf::LogManager* internal_cvfLogManager();
54 
55 private:
56  LogManager(cvf::LogManager* cvfLogManager);
57 
58  CEE_PRIVATE_IMPL(LogManager);
59  CEE_DISALLOW_COPY_AND_ASSIGN(LogManager);
60 
61  friend class CoreComponent;
62 };
63 
64 } // namespace cee
Definition: LogEvent.h:19
Static class for initialization of the Core component.
Definition: CoreComponent.h:32
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppAssert.cpp:18
A general unicode based string class.
Definition: Str.h:28
Base class for all reference counted objects with built-in support for intrusive reference counting...
Definition: RefCountedObject.h:34
Represents a source code location.
Definition: CodeLocation.h:23
Class for managing log messages.
Definition: LogManager.h:33
Base class for log destinations.
Definition: LogDestination.h:35