[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog libbase/log.cpp libbase/log.h
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog libbase/log.cpp libbase/log.h |
Date: |
Wed, 23 Jan 2008 16:33:45 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 08/01/23 16:33:45
Modified files:
. : ChangeLog
libbase : log.cpp log.h
Log message:
append to the log instead of truncating.
This is so a web page containing multiple SWF movies doesn't
trigger writes to truncated logs.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5478&r2=1.5479
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/log.cpp?cvsroot=gnash&r1=1.59&r2=1.60
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/log.h?cvsroot=gnash&r1=1.62&r2=1.63
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5478
retrieving revision 1.5479
diff -u -b -r1.5478 -r1.5479
--- ChangeLog 23 Jan 2008 14:21:58 -0000 1.5478
+++ ChangeLog 23 Jan 2008 16:33:44 -0000 1.5479
@@ -1,5 +1,11 @@
2008-01-23 Sandro Santilli <address@hidden>
+ * libbase/log.{cpp,h}: append to the log instead of truncating.
+ This is so a web page containing multiple SWF movies doesn't
+ trigger writes to truncated logs.
+
+2008-01-23 Sandro Santilli <address@hidden>
+
* server/parser/shape_character_def.cpp (read): only
skip parsing shapes with 0 line/fill bits if the tag
is a DEFINEFONT*. Fixes bug #22000 and a secondary
Index: libbase/log.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/log.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -b -r1.59 -r1.60
--- libbase/log.cpp 21 Jan 2008 20:55:44 -0000 1.59
+++ libbase/log.cpp 23 Jan 2008 16:33:45 -0000 1.60
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: log.cpp,v 1.59 2008/01/21 20:55:44 rsavoye Exp $ */
+/* $Id: log.cpp,v 1.60 2008/01/23 16:33:45 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "gnashconfig.h"
@@ -385,47 +385,18 @@
{
string loadfile;
-// Flip this ifdef to have the default files be stored in /tmp instead
-// of in the users home directory.
-#if 0
- char *home = getenv("HOME");
- if (home) {
- loadfile = home;
- loadfile += DEFAULT_LOGFILE;
- return parse_file(loadfile);
- }
-#else
- // Flip this ifdef to have the default files go to /tmp, instead of
- // the current directory. For the plugin, this creates the debug
- // file in the users home directory when running from a desktop menu.
-# if 0
- loadfile = "/tmp/";
- loadfile += DEFAULT_LOGFILE;
-# else
RcInitFile& rcfile = RcInitFile::getDefaultInstance();
loadfile = rcfile.getDebugLog();
if ( loadfile.empty() ) loadfile = DEFAULT_LOGFILE;
-# endif
-#endif
-
// TODO: expand ~ to getenv("HOME") !!
openLog(loadfile);
}
-LogFile::LogFile (const char *filespec)
- :
- _state(CLOSED),
- _stamp(true),
- _write(true)
-{
- openLog(filespec);
-}
-
bool
-LogFile::openLog (const char *filespec)
+LogFile::openLog (const std::string& filespec)
{
boost::mutex::scoped_lock lock(_ioMutex);
if (_state == OPEN) {
@@ -433,10 +404,11 @@
_state = CLOSED;
}
- _outstream.open (filespec, ios::out);
+ // Append, don't truncate, the log file
+ _outstream.open (filespec.c_str(), ios::app); // ios::out
if( ! _outstream ) {
// Can't use log_error here...
- std::cerr << "ERROR: can't open debug log file " << filespec << " for
writing." << std::endl;
+ std::cerr << "ERROR: can't open debug log file " << filespec << " for
appending." << std::endl;
return false;
}
Index: libbase/log.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/log.h,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -b -r1.62 -r1.63
--- libbase/log.h 21 Jan 2008 20:55:44 -0000 1.62
+++ libbase/log.h 23 Jan 2008 16:33:45 -0000 1.63
@@ -105,13 +105,7 @@
///
/// @return true on success, false on failure
///
- bool openLog(const std::string& filespec)
- {
- return openLog(filespec.c_str());
- }
-
- /// See openLog(const std::string&)
- bool openLog(const char *filespec);
+ bool openLog(const std::string& filespec);
/// Remove the log file
//
@@ -168,9 +162,6 @@
// Use getDefaultInstance for getting the singleton
LogFile (void);
- // Use getDefaultInstance for getting the singleton
- LogFile (const char *);
-
boost::mutex _ioMutex;
static std::ofstream _console;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog libbase/log.cpp libbase/log.h,
Sandro Santilli <=