logs-cf-plugin 0.0.40.pre → 0.0.41.pre

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,8 +4,12 @@ module MessageWriter
4
4
  include CF::Interactive
5
5
 
6
6
  def write(app, output, message)
7
- msg = [app.name, message.source_type_name, message.source_id, message.message_type_name, message.message].join(" ")
7
+ msg = [format_time(message.timestamp), app.name, message.source_type_name, message.source_id, message.message_type_name, message.message].join(" ")
8
8
  msg = c(msg.chomp, :error) if message.message_type == LogMessage::MessageType::ERR
9
9
  output.puts(msg)
10
10
  end
11
+
12
+ def format_time(timestamp)
13
+ Time.at(timestamp).strftime("%b %d %H:%M:%S")
14
+ end
11
15
  end
@@ -14,7 +14,7 @@ module LogsCfPlugin
14
14
  include LoginRequirements
15
15
  include MessageWriter
16
16
 
17
- desc "Tail or dump logs for CF applications or spaces"
17
+ desc "Tail or dump logs for CF applications"
18
18
  group :apps
19
19
  input :app, :desc => "App to tail logs from", :argument => :optional, :from_given => by_name(:app)
20
20
  input :recent, :type => :boolean, :desc => "Dump recent logs instead of tailing", :default => false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logs-cf-plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.40.pre
4
+ version: 0.0.41.pre
5
5
  prerelease: 7
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-05 00:00:00.000000000 Z
12
+ date: 2013-09-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cf