#include "logger.h" #include #include #include #include "global.h" namespace { class Logger { public: Logger() : logfile_(GetAbsolutePath("debug.log")) {} void LogLine(const std::string& text) { std::lock_guard guard(file_mutex_); logfile_ << "[" << std::chrono::system_clock::now() << "] " << text << std::endl; logfile_.flush(); } private: std::ofstream logfile_; std::mutex file_mutex_; }; } // namespace void TrackerLog(const std::string& text) { static Logger* instance = new Logger(); instance->LogLine(text); } n'>index : thoughts
mixed-content personal blog
about summary refs log tree commit diff stats
blob: 56ef149431bd30ee87f9ecb2cde4b071c68d2731 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
class Users::PasswordsController < Devise::PasswordsController
  layout "userdata"
  # GET /resource/password/new
  # def new
  #   super
  # end

  # POST /resource/password
  # def create
  #   super
  # end

  # GET /resource/password/edit?reset_password_token=abcdef
  # def edit
  #   super
  # end

  # PUT /resource/password
  # def update
  #   super
  # end

  # protected

  # def after_resetting_password_path_for(resource)
  #   super(resource)
  # end

  # The path used after sending reset password instructions
  # def after_sending_reset_password_instructions_path_for(resource_name)
  #   super(resource_name)
  # end
end