[yast-commit] r55811 - in /trunk/storage/libstorage/src: AppUtil.cc AppUtil.h
Author: aschnell
Date: Fri Feb 27 12:28:54 2009
New Revision: 55811
URL: http://svn.opensuse.org/viewcvs/yast?rev=55811&view=rev
Log:
- reduced size of generated code for logging functions
Modified:
trunk/storage/libstorage/src/AppUtil.cc
trunk/storage/libstorage/src/AppUtil.h
Modified: trunk/storage/libstorage/src/AppUtil.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/AppUtil.cc?rev=55811&r1=55810&r2=55811&view=diff
==============================================================================
--- trunk/storage/libstorage/src/AppUtil.cc (original)
+++ trunk/storage/libstorage/src/AppUtil.cc Fri Feb 27 12:28:54 2009
@@ -360,18 +360,22 @@
}
-void
-prepareLogStream(std::ostringstream& s)
+ostringstream*
+logStreamOpen()
{
- s.imbue(std::locale::classic());
- s.setf(std::ios::boolalpha);
- s.setf(std::ios::showbase);
+ std::ostringstream* stream = new ostringstream;
+
+ stream->imbue(std::locale::classic());
+ stream->setf(std::ios::boolalpha);
+ stream->setf(std::ios::showbase);
+
+ return stream;
}
void
-logMsg(LogLevel level, const char* file, unsigned line, const char* func,
- const string& str)
+logStreamClose(LogLevel level, const char* file, unsigned line, const char* func,
+ ostringstream* stream)
{
using namespace blocxx;
@@ -405,9 +409,11 @@
if (!category.empty())
{
LogAppender::getCurrentLogAppender()->logMessage(LogMessage(component, category,
- String(str), file,
- line, func));
+ String(stream->str()),
+ file, line, func));
}
+
+ delete stream;
}
Modified: trunk/storage/libstorage/src/AppUtil.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/AppUtil.h?rev=55811&r1=55810&r2=55811&view=diff
==============================================================================
--- trunk/storage/libstorage/src/AppUtil.h (original)
+++ trunk/storage/libstorage/src/AppUtil.h Fri Feb 27 12:28:54 2009
@@ -32,7 +32,7 @@
bool multipleDelim=true, bool skipEmpty=true,
const string& quotes="" );
string mergeString( const std::list<string>& l, const string& del=" " );
-std::map
participants (1)
-
aschnell@svn.opensuse.org