aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/llerrorcontrol.h
diff options
context:
space:
mode:
authorAleric Inglewood2010-11-07 16:55:50 +0100
committerAleric Inglewood2010-11-07 18:27:48 +0100
commit5b4356cefbaa7dbdc8656e7283c110a893b1a89c (patch)
tree43fae9945562c3281746370d623877840ed884b2 /linden/indra/llcommon/llerrorcontrol.h
parentIMP-688: ERROR: getString: Invalid string control nick01 (diff)
downloadmeta-impy-5b4356cefbaa7dbdc8656e7283c110a893b1a89c.zip
meta-impy-5b4356cefbaa7dbdc8656e7283c110a893b1a89c.tar.gz
meta-impy-5b4356cefbaa7dbdc8656e7283c110a893b1a89c.tar.bz2
meta-impy-5b4356cefbaa7dbdc8656e7283c110a893b1a89c.tar.xz
IMP-692: SNOW-713: Global objects in libllcommon duplicated in plugins
See http://jira.secondlife.com/browse/SNOW-713 This patch makes llcommon shared. It contains the following snowglobe (SVN) changesets: 3478, 3479, 3480, 3481, 3482, 3485, 3496, 3498, 3500, 3519 and 3531, plus the fix for all rejects. Note that changes to scripts/automated_build_scripts/opensrc-build.sh (changesets 3500 and 3625) were ignored as we don't have scripts/automated_build_scripts.
Diffstat (limited to 'linden/indra/llcommon/llerrorcontrol.h')
-rw-r--r--linden/indra/llcommon/llerrorcontrol.h46
1 files changed, 23 insertions, 23 deletions
diff --git a/linden/indra/llcommon/llerrorcontrol.h b/linden/indra/llcommon/llerrorcontrol.h
index fae7547..54138b2 100644
--- a/linden/indra/llcommon/llerrorcontrol.h
+++ b/linden/indra/llcommon/llerrorcontrol.h
@@ -52,12 +52,12 @@ class LLSD;
52 52
53namespace LLError 53namespace LLError
54{ 54{
55 void initForServer(const std::string& identity); 55 LL_COMMON_API void initForServer(const std::string& identity);
56 // resets all logging settings to defaults needed by server processes 56 // resets all logging settings to defaults needed by server processes
57 // logs to stderr, syslog, and windows debug log 57 // logs to stderr, syslog, and windows debug log
58 // the identity string is used for in the syslog 58 // the identity string is used for in the syslog
59 59
60 void initForApplication(const std::string& dir); 60 LL_COMMON_API void initForApplication(const std::string& dir);
61 // resets all logging settings to defaults needed by applicaitons 61 // resets all logging settings to defaults needed by applicaitons
62 // logs to stderr and windows debug log 62 // logs to stderr and windows debug log
63 // sets up log configuration from the file logcontrol.xml in dir 63 // sets up log configuration from the file logcontrol.xml in dir
@@ -68,14 +68,14 @@ namespace LLError
68 Setting a level means log messages at that level or above. 68 Setting a level means log messages at that level or above.
69 */ 69 */
70 70
71 void setPrintLocation(bool); 71 LL_COMMON_API void setPrintLocation(bool);
72 void setDefaultLevel(LLError::ELevel); 72 LL_COMMON_API void setDefaultLevel(LLError::ELevel);
73 void setFunctionLevel(const std::string& function_name, LLError::ELevel); 73 LL_COMMON_API void setFunctionLevel(const std::string& function_name, LLError::ELevel);
74 void setClassLevel(const std::string& class_name, LLError::ELevel); 74 LL_COMMON_API void setClassLevel(const std::string& class_name, LLError::ELevel);
75 void setFileLevel(const std::string& file_name, LLError::ELevel); 75 LL_COMMON_API void setFileLevel(const std::string& file_name, LLError::ELevel);
76 void setTagLevel(const std::string& file_name, LLError::ELevel); 76 LL_COMMON_API void setTagLevel(const std::string& file_name, LLError::ELevel);
77 77
78 void configure(const LLSD&); 78 LL_COMMON_API void configure(const LLSD&);
79 // the LLSD can configure all of the settings 79 // the LLSD can configure all of the settings
80 // usually read automatically from the live errorlog.xml file 80 // usually read automatically from the live errorlog.xml file
81 81
@@ -85,25 +85,25 @@ namespace LLError
85 */ 85 */
86 86
87 typedef void(*FatalFunction)(const std::string& message); 87 typedef void(*FatalFunction)(const std::string& message);
88 void crashAndLoop(const std::string& message); 88 LL_COMMON_API void crashAndLoop(const std::string& message);
89 // Default fatal funtion: access null pointer and loops forever 89 // Default fatal funtion: access null pointer and loops forever
90 90
91 void setFatalFunction(FatalFunction); 91 LL_COMMON_API void setFatalFunction(FatalFunction);
92 // The fatal function will be called when an message of LEVEL_ERROR 92 // The fatal function will be called when an message of LEVEL_ERROR
93 // is logged. Note: supressing a LEVEL_ERROR message from being logged 93 // is logged. Note: supressing a LEVEL_ERROR message from being logged
94 // (by, for example, setting a class level to LEVEL_NONE), will keep 94 // (by, for example, setting a class level to LEVEL_NONE), will keep
95 // the that message from causing the fatal funciton to be invoked. 95 // the that message from causing the fatal funciton to be invoked.
96 96
97 typedef std::string (*TimeFunction)(); 97 typedef std::string (*TimeFunction)();
98 std::string utcTime(); 98 LL_COMMON_API std::string utcTime();
99 99
100 void setTimeFunction(TimeFunction); 100 LL_COMMON_API void setTimeFunction(TimeFunction);
101 // The function is use to return the current time, formatted for 101 // The function is use to return the current time, formatted for
102 // display by those error recorders that want the time included. 102 // display by those error recorders that want the time included.
103 103
104 104
105 105
106 class Recorder 106 class LL_COMMON_API Recorder
107 { 107 {
108 // An object that handles the actual output or error messages. 108 // An object that handles the actual output or error messages.
109 public: 109 public:
@@ -117,17 +117,17 @@ namespace LLError
117 // included in the text of the message 117 // included in the text of the message
118 }; 118 };
119 119
120 void addRecorder(Recorder*); 120 LL_COMMON_API void addRecorder(Recorder*);
121 void removeRecorder(Recorder*); 121 LL_COMMON_API void removeRecorder(Recorder*);
122 // each error message is passed to each recorder via recordMessage() 122 // each error message is passed to each recorder via recordMessage()
123 123
124 void logToFile(const std::string& filename); 124 LL_COMMON_API void logToFile(const std::string& filename);
125 void logToFixedBuffer(LLFixedBuffer*); 125 LL_COMMON_API void logToFixedBuffer(LLFixedBuffer*);
126 // Utilities to add recorders for logging to a file or a fixed buffer 126 // Utilities to add recorders for logging to a file or a fixed buffer
127 // A second call to the same function will remove the logger added 127 // A second call to the same function will remove the logger added
128 // with the first. 128 // with the first.
129 // Passing the empty string or NULL to just removes any prior. 129 // Passing the empty string or NULL to just removes any prior.
130 std::string logFileName(); 130 LL_COMMON_API std::string logFileName();
131 // returns name of current logging file, empty string if none 131 // returns name of current logging file, empty string if none
132 132
133 133
@@ -136,11 +136,11 @@ namespace LLError
136 */ 136 */
137 137
138 class Settings; 138 class Settings;
139 Settings* saveAndResetSettings(); 139 LL_COMMON_API Settings* saveAndResetSettings();
140 void restoreSettings(Settings *); 140 LL_COMMON_API void restoreSettings(Settings *);
141 141
142 std::string abbreviateFile(const std::string& filePath); 142 LL_COMMON_API std::string abbreviateFile(const std::string& filePath);
143 int shouldLogCallCount(); 143 LL_COMMON_API int shouldLogCallCount();
144 144
145}; 145};
146 146