Skip to content

Commit

Permalink
Use manageiq lib for project root and env checks
Browse files Browse the repository at this point in the history
  • Loading branch information
NickLaMuro committed Jun 19, 2017
1 parent 1b3390a commit 5d9c4ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/vmdb/loggers.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'manageiq'
require 'util/vmdb-logger'

module Vmdb
Expand Down Expand Up @@ -36,10 +37,10 @@ def self.apply_config(config)
private

def self.create_loggers
path_dir = Rails.root.join("log")
path_dir = ManageIQ.root.join("log")

$log = VMDBLogger.new(path_dir.join("evm.log"))
$rails_log = VMDBLogger.new(path_dir.join("#{Rails.env}.log"))
$rails_log = VMDBLogger.new(path_dir.join("#{ManageIQ.env}.log"))
$audit_log = AuditLogger.new(path_dir.join("audit.log"))
$fog_log = FogLogger.new(path_dir.join("fog.log"))
$policy_log = MirroredLogger.new(path_dir.join("policy.log"), "<PolicyEngine> ")
Expand Down

0 comments on commit 5d9c4ec

Please sign in to comment.