jlog-rails 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/jlog/ajax_controller.rb +2 -2
- data/lib/jlog/version.rb +1 -1
- metadata +1 -1
@@ -5,11 +5,11 @@ module Jlog
|
|
5
5
|
|
6
6
|
def append
|
7
7
|
messages = params[:message]
|
8
|
-
messages = [
|
8
|
+
messages = [messages] unless messages.is_a? Array
|
9
9
|
messages.each do |message|
|
10
10
|
level_pattern = /^(DEBUG|INFO|WARN|ERROR|FATAL)/
|
11
11
|
level = message.match(level_pattern)[1]
|
12
|
-
message =
|
12
|
+
message = "#{Time.now} Client " << message
|
13
13
|
|
14
14
|
if ['DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL'].include? level
|
15
15
|
Rails.logger.send(level.downcase.to_sym, message)
|
data/lib/jlog/version.rb
CHANGED