a LogDestination represented by a file.
More...
#include <FileDestination.h>
|
virtual | ~FileDestination () |
|
const boost::filesystem::path & | getPath () const |
|
|
| FileDestination (const std::string &filepath, const boost::shared_ptr< LogFormatter > &formatter, int threshold=threshold::PASS_ALL, bool truncate=false) |
|
| FileDestination (const char *filepath, const boost::shared_ptr< LogFormatter > &formatter, int threshold=threshold::PASS_ALL, bool truncate=false) |
|
| FileDestination (const boost::filesystem::path &filepath, const boost::shared_ptr< LogFormatter > &formatter, int threshold=threshold::PASS_ALL, bool truncate=false) |
|
|
| FileDestination (const boost::filesystem::path &filepath, bool verbose=false, int threshold=threshold::PASS_ALL, bool truncate=false) |
|
| FileDestination (const std::string &filepath, bool verbose=false, int threshold=threshold::PASS_ALL, bool truncate=false) |
|
| FileDestination (const char *filepath, bool verbose=false, int threshold=threshold::PASS_ALL, bool truncate=false) |
|
| LogDestination (std::ostream *strm, const boost::shared_ptr< LogFormatter > &formatter, int threshold=threshold::PASS_ALL) |
| create a destination with a threshold. More...
|
|
| LogDestination (const LogDestination &that) |
|
virtual | ~LogDestination () |
|
LogDestination & | operator= (const LogDestination &that) |
|
int | getThreshold () const |
|
void | setThreshold (int threshold) |
|
bool | write (const LogRecord &rec) |
|
a LogDestination represented by a file.
This class makes it easier to attach files to Logs via Python via Log.addDestination().
Definition at line 49 of file FileDestination.h.
lsst::pex::logging::FileDestination::FileDestination |
( |
const std::string & |
filepath, |
|
|
const boost::shared_ptr< LogFormatter > & |
formatter, |
|
|
int |
threshold = threshold::PASS_ALL , |
|
|
bool |
truncate = false |
|
) |
| |
|
inline |
create a file destination. If the file does not exist, it will be created; otherwise, messages will be appended.
- Parameters
-
filepath | the path to the log file to write messages to. |
formatter | the LogFormatter to use to format the messages |
threshold | the minimum volume level required to pass a message to the stream. If not provided, it would be set to 0. |
truncate | if True, overwrite the previous contents; otherwise, new messages will be appended to the file. |
Definition at line 64 of file FileDestination.h.
71 formatter, threshold),
Extent< int, N > truncate(Extent< double, N > const &input)
boost::filesystem::path _path
LogDestination(std::ostream *strm, const boost::shared_ptr< LogFormatter > &formatter, int threshold=threshold::PASS_ALL)
create a destination with a threshold.
lsst::pex::logging::FileDestination::FileDestination |
( |
const char * |
filepath, |
|
|
const boost::shared_ptr< LogFormatter > & |
formatter, |
|
|
int |
threshold = threshold::PASS_ALL , |
|
|
bool |
truncate = false |
|
) |
| |
|
inline |
create a file destination. If the file does not exist, it will be created; otherwise, messages will be appended.
- Parameters
-
filepath | the path to the log file to write messages to. |
formatter | the LogFormatter to use to format the messages |
threshold | the minimum volume level required to pass a message to the stream. If not provided, it would be set to 0. |
truncate | if True, overwrite the previous contents; otherwise, new messages will be appended to the file. |
Definition at line 74 of file FileDestination.h.
81 formatter, threshold),
Extent< int, N > truncate(Extent< double, N > const &input)
boost::filesystem::path _path
LogDestination(std::ostream *strm, const boost::shared_ptr< LogFormatter > &formatter, int threshold=threshold::PASS_ALL)
create a destination with a threshold.
lsst::pex::logging::FileDestination::FileDestination |
( |
const boost::filesystem::path & |
filepath, |
|
|
const boost::shared_ptr< LogFormatter > & |
formatter, |
|
|
int |
threshold = threshold::PASS_ALL , |
|
|
bool |
truncate = false |
|
) |
| |
|
inline |
create a file destination. If the file does not exist, it will be created; otherwise, messages will be appended.
- Parameters
-
filepath | the path to the log file to write messages to. |
formatter | the LogFormatter to use to format the messages |
threshold | the minimum volume level required to pass a message to the stream. If not provided, it would be set to 0. |
truncate | if True, overwrite the previous contents; otherwise, new messages will be appended to the file. |
Definition at line 84 of file FileDestination.h.
91 formatter, threshold),
Extent< int, N > truncate(Extent< double, N > const &input)
boost::filesystem::path _path
LogDestination(std::ostream *strm, const boost::shared_ptr< LogFormatter > &formatter, int threshold=threshold::PASS_ALL)
create a destination with a threshold.
lsst::pex::logging::FileDestination::FileDestination |
( |
const boost::filesystem::path & |
filepath, |
|
|
bool |
verbose = false , |
|
|
int |
threshold = threshold::PASS_ALL , |
|
|
bool |
truncate = false |
|
) |
| |
create a file destination. If the file does not exist, it will be created; otherwise, messages will be appended. The IndentedFormatter will be used to format the messages
- Parameters
-
filepath | the path to the log file to write messages to. |
verbose | if True, make sure all properties are printed out to the destination |
threshold | the minimum volume level required to pass a message to the stream. If not provided, it would be set to 0. |
truncate | if True, overwrite the previous contents; otherwise, new messages will be appended to the file. |
create a file destination. If the file does not exist, it will be created; otherwise, messages will be appended. The IndentedFormatter will be used to format the messages
- Parameters
-
filepath | the path to the log file to write messages to. |
threshold | the minimum volume level required to pass a message to the stream. If not provided, it would be set to 0. |
truncate | if True, overwrite the previous contents; otherwise, new messages will be appended to the file. |
Definition at line 44 of file FileDestination.cc.
47 truncate ? std::ios::out : std::ios::app),
48 boost::shared_ptr<LogFormatter>(
new IndentedFormatter(verbose)),
Extent< int, N > truncate(Extent< double, N > const &input)
boost::filesystem::path _path
LogDestination(std::ostream *strm, const boost::shared_ptr< LogFormatter > &formatter, int threshold=threshold::PASS_ALL)
create a destination with a threshold.
lsst::pex::logging::FileDestination::FileDestination |
( |
const std::string & |
filepath, |
|
|
bool |
verbose = false , |
|
|
int |
threshold = threshold::PASS_ALL , |
|
|
bool |
truncate = false |
|
) |
| |
create a file destination. If the file does not exist, it will be created; otherwise, messages will be appended. The IndentedFormatter will be used to format the messages
- Parameters
-
filepath | the path to the log file to write messages to. |
verbose | if True, make sure all properties are printed out to the destination |
threshold | the minimum volume level required to pass a message to the stream. If not provided, it would be set to 0. |
truncate | if True, overwrite the previous contents; otherwise, new messages will be appended to the file. |
create a file destination. If the file does not exist, it will be created; otherwise, messages will be appended. The IndentedFormatter will be used to format the messages
- Parameters
-
filepath | the path to the log file to write messages to. |
threshold | the minimum volume level required to pass a message to the stream. If not provided, it would be set to 0. |
truncate | if True, overwrite the previous contents; otherwise, new messages will be appended to the file. |
Definition at line 52 of file FileDestination.cc.
55 truncate ? std::ios::out : std::ios::app),
56 boost::shared_ptr<LogFormatter>(
new IndentedFormatter(verbose)),
Extent< int, N > truncate(Extent< double, N > const &input)
boost::filesystem::path _path
LogDestination(std::ostream *strm, const boost::shared_ptr< LogFormatter > &formatter, int threshold=threshold::PASS_ALL)
create a destination with a threshold.
lsst::pex::logging::FileDestination::FileDestination |
( |
const char * |
filepath, |
|
|
bool |
verbose = false , |
|
|
int |
threshold = threshold::PASS_ALL , |
|
|
bool |
truncate = false |
|
) |
| |
create a file destination. If the file does not exist, it will be created; otherwise, messages will be appended. The IndentedFormatter will be used to format the messages
- Parameters
-
filepath | the path to the log file to write messages to. |
verbose | if True, make sure all properties are printed out to the destination |
threshold | the minimum volume level required to pass a message to the stream. If not provided, it would be set to 0. |
truncate | if True, overwrite the previous contents; otherwise, new messages will be appended to the file. |
create a file destination. If the file does not exist, it will be created; otherwise, messages will be appended. The IndentedFormatter will be used to format the messages
- Parameters
-
filepath | the path to the log file to write messages to. |
threshold | the minimum volume level required to pass a message to the stream. If not provided, it would be set to 0. |
truncate | if True, overwrite the previous contents; otherwise, new messages will be appended to the file. |
Definition at line 60 of file FileDestination.cc.
63 truncate ? std::ios::out : std::ios::app),
64 boost::shared_ptr<LogFormatter>(
new IndentedFormatter(verbose)),
Extent< int, N > truncate(Extent< double, N > const &input)
boost::filesystem::path _path
LogDestination(std::ostream *strm, const boost::shared_ptr< LogFormatter > &formatter, int threshold=threshold::PASS_ALL)
create a destination with a threshold.
lsst::pex::logging::FileDestination::~FileDestination |
( |
| ) |
|
|
virtual |
Definition at line 72 of file FileDestination.cc.
73 std::ofstream *ofstrm =
dynamic_cast<std::ofstream*
>(
_strm);
74 if (ofstrm != NULL && ofstrm->is_open()) {
const boost::filesystem::path& lsst::pex::logging::FileDestination::getPath |
( |
| ) |
const |
|
inline |
boost::filesystem::path lsst::pex::logging::FileDestination::_path |
|
protected |
The documentation for this class was generated from the following files: