Sierra Toolkit  Version of the Day
OutputLog.hpp
Go to the documentation of this file.
1 /*------------------------------------------------------------------------*/
2 /* Copyright 2010 Sandia Corporation. */
3 /* Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive */
4 /* license for use of this work by or on behalf of the U.S. Government. */
5 /* Export of this program may require a license from the */
6 /* United States Government. */
7 /*------------------------------------------------------------------------*/
8 
9 #ifndef STK_UTIL_ENVIRONMENT_OUTPUTLOG_HPP
10 #define STK_UTIL_ENVIRONMENT_OUTPUTLOG_HPP
11 
12 #include <iosfwd>
13 #include <string>
14 
15 // #include <stk_util/util/TeeStreambuf.hpp>
16 
17 namespace stk_classic {
18 
19 template<class Ch, class Tr>
21 
24 
29 
65 void register_ostream(std::ostream &os, const std::string &name);
66 
73 void unregister_ostream(std::ostream &os);
74 
95 void bind_output_streams(const std::string &output_description);
96 
107 void register_log_ostream(std::ostream &os, const std::string &name);
108 
116 void unregister_log_ostream(std::ostream &os);
117 
131 void create_log_file(const std::string &name, const std::string &path);
132 
141 void close_log_file(const std::string &name);
142 
153 bool is_registered_ostream(const std::string &name);
154 
166 const std::string &get_log_path(const std::string &name);
167 
178 std::ostream *get_log_ostream(const std::string &name);
179 
190 std::ostream *get_ostream_ostream(const std::string &name);
191 
202 std::ostream *get_ostream_tee_ostream(const std::string &name);
203 
207 
208 } // namespace stk_classic
209 
210 namespace sierra {
211 
212 std::ostream &out();
213 std::ostream &dout();
214 std::ostream &pout();
215 std::ostream &tout();
216 
217 std::ostream &dwout();
218 
219 } // namespace sierra
220 
221 
222 #endif // STK_UTIL_ENVIRONMENT_OUTPUTLOG_HPP
std::ostream & dout()
Diagnostic output stream.
Definition: OutputLog.cpp:674
std::ostream & dwout()
Diagnostic writer stream.
Definition: OutputLog.cpp:690
Definition: Env.cpp:53
const std::string & get_log_path(const std::string &name)
Function get_log_path returns the file path of the log file with the specified name from the log file...
Definition: OutputLog.cpp:249
std::ostream & pout()
Per-processor output stream (See RuntimeDeferredx)
Definition: OutputLog.cpp:666
std::ostream & out()
Normal output stream.
Definition: OutputLog.cpp:658
stk_classic::basic_tee_streambuf< char, std::char_traits< char > > tee_streambuf
Tee stream buffer for char.
Definition: OutputLog.hpp:20
void create_log_file(const std::string &name, const std::string &path)
Function create_log_file opens a log file at the specified path and adds it to the registry of log fi...
Definition: OutputLog.cpp:165
Class basic_tee_streambuf maintains a list of destination output stream buffers to send written chara...
Definition: OutputLog.hpp:20
void close_log_file(const std::string &name)
Function close_log_file close the log file with the specified name and removes it from the registry o...
Definition: OutputLog.cpp:190
std::ostream * get_ostream_ostream(const std::string &name)
Function get_ostream_streambuf locates the output stream registered with the specified name...
Definition: OutputLog.cpp:320
std::ostream * get_ostream_tee_ostream(const std::string &name)
Function get_ostream_tee_streambuf locates the tee streambuf registered with the specified name...
Definition: OutputLog.cpp:344
void bind_output_streams(const std::string &output_description)
Function bind_output_streams parses the output_description and opens and registers the log streams an...
Definition: OutputLog.cpp:644
bool is_registered_ostream(const std::string &name)
Function is_registered_ostream returns true if an output stream of the specified name is registered...
Definition: OutputLog.cpp:356
Sierra Toolkit.
std::ostream & tout()
Regression test textual output stream.
Definition: OutputLog.cpp:682
std::ostream * get_log_ostream(const std::string &name)
Function get_log_file_ostream return the output stream of the log file with the specified name from t...
Definition: OutputLog.cpp:263
void unregister_ostream(std::ostream &os)
Function unregister_ostream unregisters an output stream.
Definition: OutputLog.cpp:300
void unregister_log_ostream(std::ostream &os)
Function register_log_ostream takes an existing std::ostream and makes it available for output redire...
Definition: OutputLog.cpp:228
void register_log_ostream(std::ostream &os, const std::string &name)
Function register_log_ostream takes an existing std::ostream and makes it available for output redire...
Definition: OutputLog.cpp:205
void register_ostream(std::ostream &os, const std::string &name)
Function register_ostream registers an output stream with the output stream registry. The registration process creates an intermediate tee streambuf.
Definition: OutputLog.cpp:275