diff --git a/doomsday/libdeng2/include/de/core/monospacelogsinkformatter.h b/doomsday/libdeng2/include/de/core/monospacelogsinkformatter.h index ddb68d5d92..b4904348ec 100644 --- a/doomsday/libdeng2/include/de/core/monospacelogsinkformatter.h +++ b/doomsday/libdeng2/include/de/core/monospacelogsinkformatter.h @@ -35,6 +35,16 @@ class MonospaceLogSinkFormatter : public LogSink::IFormatter QList logEntryToTextLines(LogEntry const &entry); + /** + * Sets the maximum line length. Entries will be wrapped onto multiple + * lines if they don't fit on one line. + * + * @param maxLength Maximum line length. + */ + void setMaxLength(duint maxLength); + + duint maxLength() const; + private: duint _maxLength; int _minimumIndent; diff --git a/doomsday/libdeng2/src/core/monospacelogsinkformatter.cpp b/doomsday/libdeng2/src/core/monospacelogsinkformatter.cpp index 51403bfe99..d0dee70dd6 100644 --- a/doomsday/libdeng2/src/core/monospacelogsinkformatter.cpp +++ b/doomsday/libdeng2/src/core/monospacelogsinkformatter.cpp @@ -178,4 +178,14 @@ QList MonospaceLogSinkFormatter::logEntryToTextLines(LogEntry const &ent return resultLines; } +void MonospaceLogSinkFormatter::setMaxLength(duint maxLength) +{ + _maxLength = maxLength; +} + +duint MonospaceLogSinkFormatter::maxLength() const +{ + return _maxLength; +} + } // namespace de