diff options
author | Armin Weatherwax | 2011-02-16 13:20:04 +0100 |
---|---|---|
committer | Armin Weatherwax | 2011-03-01 14:33:48 +0100 |
commit | 35f256d0597e55c6e2680ca612871c9b457a572a (patch) | |
tree | 0be2c212614b7ea1b246ece04a65a662b00074d4 /linden/indra/llplugin/slplugin | |
parent | remove unused webkit include in llplugin (diff) | |
download | meta-impy-35f256d0597e55c6e2680ca612871c9b457a572a.zip meta-impy-35f256d0597e55c6e2680ca612871c9b457a572a.tar.gz meta-impy-35f256d0597e55c6e2680ca612871c9b457a572a.tar.bz2 meta-impy-35f256d0597e55c6e2680ca612871c9b457a572a.tar.xz |
use logcontrol.xml also for SLPlugin
Diffstat (limited to 'linden/indra/llplugin/slplugin')
-rwxr-xr-x | linden/indra/llplugin/slplugin/slplugin.cpp | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/linden/indra/llplugin/slplugin/slplugin.cpp b/linden/indra/llplugin/slplugin/slplugin.cpp index 09331ca..347f1de 100755 --- a/linden/indra/llplugin/slplugin/slplugin.cpp +++ b/linden/indra/llplugin/slplugin/slplugin.cpp | |||
@@ -54,6 +54,20 @@ | |||
54 | #include <signal.h> | 54 | #include <signal.h> |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | //imprudence: or we include lldir, or use apache runtime | ||
58 | //though the one is probably bloat and the other we rather want to avoid | ||
59 | #include <stdio.h> // FILENAME_MAX | ||
60 | #ifdef WINDOWS | ||
61 | #include <direct.h> | ||
62 | #define getImpruDir _getcwd | ||
63 | #define DIR_DELIMITER "\\" | ||
64 | #else | ||
65 | #include <unistd.h> | ||
66 | #define getImpruDir getcwd | ||
67 | #define DIR_DELIMITER "/" | ||
68 | #endif | ||
69 | |||
70 | |||
57 | /* | 71 | /* |
58 | On Mac OS, since we call WaitNextEvent, this process will show up in the dock unless we set the LSBackgroundOnly or LSUIElement flag in the Info.plist. | 72 | On Mac OS, since we call WaitNextEvent, this process will show up in the dock unless we set the LSBackgroundOnly or LSUIElement flag in the Info.plist. |
59 | 73 | ||
@@ -188,9 +202,28 @@ int main(int argc, char **argv) | |||
188 | { | 202 | { |
189 | // Set up llerror logging | 203 | // Set up llerror logging |
190 | { | 204 | { |
191 | LLError::initForApplication("."); | 205 | std::string path; |
192 | LLError::setDefaultLevel(LLError::LEVEL_INFO); | 206 | char impruPath[FILENAME_MAX]; |
193 | // LLError::setTagLevel("Plugin", LLError::LEVEL_DEBUG); | 207 | |
208 | if (!getImpruDir(impruPath, sizeof(impruPath))) | ||
209 | { | ||
210 | path = "."; //FIXME: root directory of the system - bad idea | ||
211 | } | ||
212 | else | ||
213 | { | ||
214 | path = std::string(impruPath); | ||
215 | |||
216 | path.append(DIR_DELIMITER); | ||
217 | path.append("app_settings"); | ||
218 | } | ||
219 | LLError::initForApplication(path); | ||
220 | // LLError::setDefaultLevel(LLError::LEVEL_INFO); | ||
221 | // LLError::setPrintLocation(true); | ||
222 | // LLError::setTagLevel("Plugin", LLError::LEVEL_DEBUG); | ||
223 | // LLError::setTagLevel("PluginPipe", LLError::LEVEL_DEBUG); | ||
224 | // LLError::setTagLevel("PluginChild", LLError::LEVEL_DEBUG); | ||
225 | // LLError::setTagLevel("PluginInstance", LLError::LEVEL_DEBUG); | ||
226 | |||
194 | // LLError::logToFile("slplugin.log"); | 227 | // LLError::logToFile("slplugin.log"); |
195 | } | 228 | } |
196 | 229 | ||