diff --git a/log/log.cpp b/log/log.cpp index d3903b6..82336e3 100644 --- a/log/log.cpp +++ b/log/log.cpp @@ -41,6 +41,8 @@ #include "date/date.h" #include "utf8/utf8.h" +#include "morm.h" + namespace PT { @@ -311,6 +313,14 @@ Log & Log::operator<<(const PT::Date & date) +Log & Log::operator<<(morm::Model & model) +{ + operator<<(model.to_string()); + return *this; +} + + + Log & Log::operator<<(Manipulators m) { switch(m) diff --git a/log/log.h b/log/log.h index ec1011f..c5d72bb 100644 --- a/log/log.h +++ b/log/log.h @@ -45,6 +45,12 @@ +namespace morm +{ + class Model; +} + + namespace PT { @@ -125,8 +131,14 @@ public: virtual Log & operator<<(const PT::Space & space); virtual Log & operator<<(const PT::Date & date); + virtual Log & operator<<(morm::Model & model); + + virtual Log & operator<<(Manipulators m); + + + virtual Log & LogString(const std::string & value, size_t max_size); virtual Log & LogString(const std::wstring & value, size_t max_size);