diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-30 10:58:22 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-30 10:58:22 +0100 |
| commit | 78bc6f9286864052b304a1871739479c16e393dd (patch) | |
| tree | 8a19ce4f55167138734eaf42a1be8db48044e55c /src/lib | |
| parent | af38609fdce431f43073406bafb48e8a9d6f558b (diff) | |
Calm down default logging a bit.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/dcp_video.cc | 11 | ||||
| -rw-r--r-- | src/lib/log.cc | 3 | ||||
| -rw-r--r-- | src/lib/log.h | 1 | ||||
| -rw-r--r-- | src/lib/writer.cc | 9 |
4 files changed, 14 insertions, 10 deletions
diff --git a/src/lib/dcp_video.cc b/src/lib/dcp_video.cc index 3879947eb..7610e6c9f 100644 --- a/src/lib/dcp_video.cc +++ b/src/lib/dcp_video.cc @@ -59,6 +59,7 @@ #include <errno.h> #define LOG_GENERAL(...) _log->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL); +#define LOG_DEBUG_ENCODE(...) _log->log (String::compose (__VA_ARGS__), Log::TYPE_DEBUG_ENCODE); #include "i18n.h" @@ -223,13 +224,13 @@ DCPVideo::encode_locally (dcp::NoteHandler note) switch (_frame->eyes()) { case EYES_BOTH: - LOG_GENERAL (N_("Finished locally-encoded frame %1 for mono"), _index); + LOG_DEBUG_ENCODE (N_("Finished locally-encoded frame %1 for mono"), _index); break; case EYES_LEFT: - LOG_GENERAL (N_("Finished locally-encoded frame %1 for L"), _index); + LOG_DEBUG_ENCODE (N_("Finished locally-encoded frame %1 for L"), _index); break; case EYES_RIGHT: - LOG_GENERAL (N_("Finished locally-encoded frame %1 for R"), _index); + LOG_DEBUG_ENCODE (N_("Finished locally-encoded frame %1 for R"), _index); break; default: break; @@ -266,7 +267,7 @@ DCPVideo::encode_remotely (ServerDescription serv) root->add_child("Version")->add_child_text (raw_convert<string> (SERVER_LINK_VERSION)); add_metadata (root); - LOG_GENERAL (N_("Sending frame %1 to remote"), _index); + LOG_DEBUG_ENCODE (N_("Sending frame %1 to remote"), _index); /* Send XML metadata */ string xml = doc.write_to_string ("UTF-8"); @@ -282,7 +283,7 @@ DCPVideo::encode_remotely (ServerDescription serv) Data e (socket->read_uint32 ()); socket->read (e.data().get(), e.size()); - LOG_GENERAL (N_("Finished remotely-encoded frame %1"), _index); + LOG_DEBUG_ENCODE (N_("Finished remotely-encoded frame %1"), _index); return e; } diff --git a/src/lib/log.cc b/src/lib/log.cc index d9696f3cc..ac3277c4e 100644 --- a/src/lib/log.cc +++ b/src/lib/log.cc @@ -36,7 +36,8 @@ int const Log::TYPE_GENERAL = 0x1; int const Log::TYPE_WARNING = 0x2; int const Log::TYPE_ERROR = 0x4; int const Log::TYPE_DEBUG_DECODE = 0x8; -int const Log::TYPE_TIMING = 0x10; +int const Log::TYPE_DEBUG_ENCODE = 0x10; +int const Log::TYPE_TIMING = 0x20; Log::Log () : _types (0) diff --git a/src/lib/log.h b/src/lib/log.h index 6803f8d59..73a1aa582 100644 --- a/src/lib/log.h +++ b/src/lib/log.h @@ -43,6 +43,7 @@ public: static const int TYPE_WARNING; static const int TYPE_ERROR; static const int TYPE_DEBUG_DECODE; + static const int TYPE_DEBUG_ENCODE; static const int TYPE_TIMING; void log (std::string message, int type); diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 7099f51c2..e911c3720 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -55,6 +55,7 @@ #include "i18n.h" #define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL); +#define LOG_DEBUG_ENCODE(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_DEBUG_ENCODE); #define LOG_TIMING(...) _film->log()->microsecond_log (String::compose (__VA_ARGS__), Log::TYPE_TIMING); #define LOG_WARNING_NC(...) _film->log()->log (__VA_ARGS__, Log::TYPE_WARNING); #define LOG_WARNING(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_WARNING); @@ -361,7 +362,7 @@ try switch (qi.type) { case QueueItem::FULL: { - LOG_GENERAL (N_("Writer FULL-writes %1 (%2)"), qi.frame, qi.eyes); + LOG_DEBUG_ENCODE (N_("Writer FULL-writes %1 (%2)"), qi.frame, qi.eyes); if (!qi.encoded) { qi.encoded = Data (_film->j2c_path (qi.frame, qi.eyes, false)); } @@ -373,13 +374,13 @@ try break; } case QueueItem::FAKE: - LOG_GENERAL (N_("Writer FAKE-writes %1"), qi.frame); + LOG_DEBUG_ENCODE (N_("Writer FAKE-writes %1"), qi.frame); _picture_asset_writer->fake_write (qi.size); _last_written[qi.eyes].reset (); ++_fake_written; break; case QueueItem::REPEAT: - LOG_GENERAL (N_("Writer REPEAT-writes %1"), qi.frame); + LOG_DEBUG_ENCODE (N_("Writer REPEAT-writes %1"), qi.frame); dcp::FrameInfo fin = _picture_asset_writer->write ( _last_written[qi.eyes]->data().get(), _last_written[qi.eyes]->size() @@ -678,7 +679,7 @@ Writer::check_existing_picture_asset () } } - LOG_GENERAL ("Have existing frame %1", _first_nonexistant_frame); + LOG_DEBUG_ENCODE ("Have existing frame %1", _first_nonexistant_frame); ++_first_nonexistant_frame; } |
