mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-13 04:36:16 +00:00
Use log_buffer for console logs.
This commit is contained in:
+5
-7
@@ -183,6 +183,9 @@ main(int argc, char** argv) {
|
||||
|
||||
cachedTime = rak::timer::current();
|
||||
|
||||
// Initialize logging:
|
||||
torrent::log_initialize();
|
||||
|
||||
control = new Control;
|
||||
|
||||
worker_thread = new ThreadWorker();
|
||||
@@ -205,6 +208,8 @@ main(int argc, char** argv) {
|
||||
// to process new non-socket events.
|
||||
SignalHandler::set_handler(SIGUSR1, sigc::ptr_fun(&do_nothing));
|
||||
|
||||
torrent::log_add_group_output(torrent::LOG_INFO, "important");
|
||||
|
||||
torrent::Poll::slot_create_poll() = std::tr1::bind(&core::create_poll);
|
||||
|
||||
torrent::initialize();
|
||||
@@ -215,13 +220,6 @@ main(int argc, char** argv) {
|
||||
// torrent::ConnectionManager* are valid etc.
|
||||
initialize_commands();
|
||||
|
||||
// Initialize logging:
|
||||
torrent::log_initialize();
|
||||
torrent::log_open_output("console", std::bind(&core::Manager::push_log, control->core(), std::placeholders::_1));
|
||||
torrent::log_add_group_output(torrent::LOG_INFO, "console");
|
||||
|
||||
lt_log_print(torrent::LOG_INFO, "Started logging to 'console'.");
|
||||
|
||||
if (OptionParser::has_flag('D', argc, argv)) {
|
||||
rpc::call_command_set_value("method.use_deprecated.set", false);
|
||||
lt_log_print(torrent::LOG_WARN, "Disabled deprecated commands.");
|
||||
|
||||
Reference in New Issue
Block a user