27 static std::mutex theMutex;
31 template <
class charT,
class traits = std::
char_traits<
charT> >
40 std::streamsize
xsputn(
const charT * , std::streamsize )
50 template <
class charT,
class traits = std::
char_traits<
charT> >
70 std::lock_guard<std::mutex> scopedLock(
fileMutex);
71 if(!traits::eq_int_type(c, traits::eof()))
79 virtual std::streamsize
xsputn(
const charT * pChar, std::streamsize
n)
81 std::lock_guard<std::mutex> scopedLock(
fileMutex);
90 std::lock_guard<std::mutex> scopedLock(
fileMutex);
103 std::ios::app|std::ios::out);
165 std::lock_guard<std::mutex> lock(theMutex);
166 theOssimFatalStream = &std::cerr;
167 theOssimWarnStream = &std::cout;
168 theOssimInfoStream = &std::cout;
169 theOssimNoticeStream = &std::cout;
170 theOssimDebugStream = &std::cout;
171 theOssimAlwaysStream = &std::cout;
177 std::lock_guard<std::mutex> lock(theMutex);
180 theOssimFatalStream = outputStream;
184 theOssimWarnStream = outputStream;
188 theOssimInfoStream = outputStream;
192 theOssimNoticeStream = outputStream;
196 theOssimDebugStream = outputStream;
202 std::lock_guard<std::mutex> lock(theMutex);
209 notifyStream = theOssimAlwaysStream;
214 notifyStream = theOssimFatalStream;
219 notifyStream = theOssimWarnStream;
224 notifyStream = theOssimInfoStream;
229 notifyStream = theOssimNoticeStream;
234 notifyStream = theOssimDebugStream;
249 return theLogFileStream;
253 bool reportMessageFlag =
false;
258 reportMessageFlag =
true;
265 reportMessageFlag =
true;
273 reportMessageFlag =
true;
281 reportMessageFlag =
true;
289 reportMessageFlag =
true;
297 reportMessageFlag =
true;
302 if(reportMessageFlag)
313 return theOssimNullStream;
318 std::lock_guard<std::mutex> lock(theMutex);
339 vsprintf(temp, fmt, args);
343 sprintf(temp,
"%s",
"");
351 std::lock_guard<std::mutex> lock(theMutex);
357 std::lock_guard<std::mutex> lock(theMutex);
364 std::lock_guard<std::mutex> lock(theMutex);
365 theNotifyFlags = notifyFlags;
370 std::lock_guard<std::mutex> lock(theMutex);
376 std::lock_guard<std::mutex> lock(theMutex);
387 std::lock_guard<std::mutex> lock(theMutex);
388 return theNotifyFlags;
395 std::lock_guard<std::mutex> lock(theMutex);
403 std::lock_guard<std::mutex> lock(theMutex);
409 const char *fmtString, ...)
416 va_start(args, fmtString);
424 const char *fmtString, ...)
429 va_start(args, fmtString);
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level)
void ossimSetInfo(const char *, const char *fmtString,...)
This is for general warnings and information feedback.
void setLogFilename(const ossimFilename &filename)
ossimNullBufferStream & operator=(const ossimNullBufferStream &)
void ossimEnableNotify(ossimNotifyFlags flags)
ossimLogFileBufferStream()
virtual ~ossimNullStream()
void ossimSetDefaultNotifyHandlers()
ossimFilename getLogFilename() const
void ossimPushNotifyFlags()
ossimFilename getLogFilename() const
void setLogFilename(const ossimFilename &file)
ossimNotifyLevel
Notification level enumeration.
std::string::size_type length() const
void ossimGetLogFilename(ossimFilename &logFile)
Returns the log filename if set.
os2<< "> n<< " > nendobj n
std::stack< ossimNotifyFlags > theNotifyFlagsStack
virtual std::streamsize xsputn(const charT *pChar, std::streamsize n)
std::streamsize xsputn(const charT *, std::streamsize)
void ossimSetNotifyFlag(ossimNotifyFlags notifyFlags)
virtual ~ossimLogFileStream()
void ossimSetNotifyStream(std::ostream *outputStream, ossimNotifyFlags whichLevelsToRedirect)
ossimNotifyFlags
Flags to allow the user to turn off certain notification levels.
void ossimPopNotifyFlags()
ossimLogFileBufferStream< char > theLogFileBufferStream
ossimNullStream & operator=(const ossimNullStream &)
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
virtual int overflow(int c)
void ossimDisableNotify(ossimNotifyFlags flags)
std::ostream * ossimGetNotifyStream(ossimNotifyLevel whichLevel)
std::basic_ofstream< char > ofstream
Class for char output file streams.
bool ossimIsReportingEnabled()
ossimString ossimErrorV(const char *fmt, va_list args)
void ossimSetLogFilename(const ossimFilename &filename)
ossimLogFileBufferStream & operator=(const ossimLogFileBufferStream &)
void ossimSetError(const char *, ossim_int32, const char *fmtString,...)
ossimLogFileStream & operator=(const ossimLogFileStream &)
ossimFilename theLogFilename
ossimNotifyFlags ossimGetNotifyFlags()
std::basic_ostream< char > ostream
Base class for char output streams.
ossimNullBufferStream< char > nullBufferStream