site24x7_apminsight 1.8.0 → 1.8.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,22 +19,28 @@ module ManageEngine
19
19
  @@objects = nil
20
20
  #Don't Change the Order of Initialize
21
21
  def initializeObjects
22
- @agent_initialized = false
23
- @shutdown = false
24
- @constants = ManageEngine::APMConstants.new
25
- @log = ManageEngine::APMLogger.new
26
- @util = ManageEngine::APMUtil.new
27
- @util.setLogger @log
28
- @config = ManageEngine::APMConfig.new
29
- @connector = ManageEngine::APMConnector.new
30
- @store = ManageEngine::APMMetricsStore.new
31
- @collector = ManageEngine::APMMetricsCollector.new
32
- @txn_util = ManageEngine::TransactionUtil.new
33
- @formatter = ManageEngine::APMMetricsFormatter.new
34
- @parser = ManageEngine::APMMetricsParser.new
35
- @agent = ManageEngine::APMAgent.new
36
- @last_dispatch_time = @@objects.util.currenttimemillis
37
- @@objects.log.debug "[APMObjectHolder] [ All Objects Initialized ] "
22
+ begin
23
+ @agent_initialized = false
24
+ @shutdown = false
25
+ @constants = ManageEngine::APMConstants.new
26
+ @log = ManageEngine::APMLogger.new
27
+ @util = ManageEngine::APMUtil.new
28
+ @util.setLogger @log
29
+ @config = ManageEngine::APMConfig.new
30
+ @connector = ManageEngine::APMConnector.new
31
+ @store = ManageEngine::APMMetricsStore.new
32
+ @collector = ManageEngine::APMMetricsCollector.new
33
+ @txn_util = ManageEngine::TransactionUtil.new
34
+ @formatter = ManageEngine::APMMetricsFormatter.new
35
+ @parser = ManageEngine::APMMetricsParser.new
36
+ @agent = ManageEngine::APMAgent.new
37
+ @last_dispatch_time = @@objects.util.currenttimemillis
38
+ @@objects.log.debug "[APMObjectHolder] [ All Objects Initialized ] "
39
+ rescue Exception => e
40
+ puts "Error initializing APM Insight Ruby agent. #{e.message}"
41
+ @shutdown = true
42
+ @agent_initialized = false
43
+ end
38
44
  end
39
45
 
40
46
  def self.instance
@@ -14,10 +14,16 @@ module ManageEngine
14
14
  path= path + '/apm.log'
15
15
  #puts "#{path}"
16
16
  # file = open(path, File::WRONLY | File::APPEND | File::CREAT)
17
- @apmlog = Logger.new(path, 10, 5 * 1024 * 1024)
18
- # @apmlog = Logger.new(file)
19
- @apmlog.level = Logger::INFO
20
- @apmlog.datetime_format = "%Y-%m-%d %H:%M:%S"
17
+ begin
18
+ @apmlog = Logger.new(path, 10, 5 * 1024 * 1024)
19
+ @apmlog.level = Logger::INFO
20
+ rescue Exception => e
21
+ puts "Unable to create/edit the log file #{path}. Writing agent logs to STDOUT.\nError: #{e.message}"
22
+ @apmlog = Logger.new(STDOUT)
23
+ @apmlog.level = Logger::WARN
24
+ end
25
+ # @apmlog = Logger.new(file)
26
+ @apmlog.datetime_format = "%Y-%m-%d %H:%M:%S"
21
27
  @apmlog.formatter = proc do |severity, datetime, progname, msg|
22
28
  "[#{datetime}|#{Process.pid}][#{severity}]:#{msg}\n"
23
29
  end
@@ -6,8 +6,8 @@
6
6
 
7
7
  module ManageEngine
8
8
  class APMInsight
9
- VERSION = '1.8.0'
9
+ VERSION = '1.8.1'
10
10
  MAJOR_VERSION = '1.8'
11
- MINOR_VERSION = '0'
11
+ MINOR_VERSION = '1'
12
12
  end
13
13
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 8
8
- - 0
9
- version: 1.8.0
8
+ - 1
9
+ version: 1.8.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Adithyan P
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2019-04-08 00:00:00 +05:30
17
+ date: 2019-05-08 00:00:00 +05:30
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency