AppLogging.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/LogManager.h"
16 #include "CeeCore/CodeLocation.h"
17 #include "CeeCore/PtrRef.h"
18 
19 namespace cee {
20 
21 
22 //==================================================================================================
23 //
24 //
25 //
26 //==================================================================================================
27 class CEE_CORE_EXPORT AppLogging
28 {
29 public:
30  static void initialize(const Str& appLoggerName);
31 
32  static void logError(const Str& message, const CodeLocation& location);
33  static void logWarning(const Str& message, const CodeLocation& location);
34  static void logInfo(const Str& message, const CodeLocation& location);
35  static void logDebug(const Str& message, const CodeLocation& location);
36 
37  static void setStandardLogLevels();
38  static void setNormalDebugLogLevels();
39  static void setFullInfoLogLevels();
40  static void setFullDebugLogLevels();
41 
42 private:
43  static Str sm_appLoggerName; // Name of the application log
44 };
45 
46 } // namespace cee
47 
48 
49 #define CEE_LOG_APP_ERROR(theMessage) (cee::AppLogging::logError(theMessage, CEE_CODE_LOCATION))
50 #define CEE_LOG_APP_WARNING(theMessage) (cee::AppLogging::logWarning(theMessage, CEE_CODE_LOCATION))
51 #define CEE_LOG_APP_INFO(theMessage) (cee::AppLogging::logInfo(theMessage, CEE_CODE_LOCATION))
52 #define CEE_LOG_APP_DEBUG(theMessage) (cee::AppLogging::logDebug(theMessage, CEE_CODE_LOCATION))
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
Static helper class for doing application level logging.
Definition: AppLogging.h:27
Represents a source code location.
Definition: CodeLocation.h:23