socialforge/config/environment.rb

29 lines
967 B
Ruby

# Load the rails application
require File.expand_path('../application', __FILE__)
# Make sure there's no plugin in vendor/plugin before starting
vendor_plugins_dir = File.join(Rails.root, "vendor", "plugins")
if Dir.glob(File.join(vendor_plugins_dir, "*")).any?
$stderr.puts "Plugins in vendor/plugins (#{vendor_plugins_dir}) are no longer allowed. " +
"Please, put your Redmine plugins in the `plugins` directory at the root of your " +
"Redmine directory (#{File.join(Rails.root, "plugins")})"
exit 1
end
# Initialize the rails application
RedmineApp::Application.initialize!
#日志格式
class Logger
def format_message(level, time, progname, msg)
"#{time.to_s(:db)} #{level} -- #{msg}\r\n"
end
end
#输出日志(database文件夹下get、sql、controller按照日期 分别输出路由信息、SQL语句、调用页面)[影响系统效率使用完请注释掉]
#include LoggerHelper
#LoggerHelper.OutLogger