mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-16 23:22:31 +00:00
Added logging, currently shows failed torrent creations but does not
time out the log messages. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@307 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
#ifndef RTORRENT_CORE_LOG_H
|
||||
#define RTORRENT_CORE_LOG_H
|
||||
|
||||
#include <deque>
|
||||
#include <string>
|
||||
#include <sigc++/signal.h>
|
||||
|
||||
#include "utils/timer.h"
|
||||
|
||||
namespace core {
|
||||
|
||||
class Log : private std::deque<std::pair<utils::Timer, std::string> > {
|
||||
public:
|
||||
typedef std::pair<utils::Timer, std::string> Type;
|
||||
typedef std::deque<Type> Base;
|
||||
typedef sigc::signal0<void> Signal;
|
||||
|
||||
using Base::iterator;
|
||||
using Base::const_iterator;
|
||||
using Base::reverse_iterator;
|
||||
using Base::const_reverse_iterator;
|
||||
|
||||
using Base::begin;
|
||||
using Base::end;
|
||||
using Base::rbegin;
|
||||
using Base::rend;
|
||||
|
||||
using Base::empty;
|
||||
using Base::size;
|
||||
|
||||
void push_front(const std::string& msg);
|
||||
|
||||
iterator find_older(utils::Timer t);
|
||||
|
||||
Signal& signal_update() { return m_signalUpdate; }
|
||||
|
||||
private:
|
||||
Signal m_signalUpdate;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user