forked from rapid7/metasploit-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: file:///home/svn/incoming/trunk@2935 4d416f70-5f16-0410-b530-b9f4589650da
- Loading branch information
Matt Miller
committed
Oct 1, 2005
1 parent
a220e67
commit 4f1aaea
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
require 'rex' | ||
require 'msf/base' | ||
|
||
module Msf | ||
|
||
### | ||
# | ||
# Logging | ||
# ------- | ||
# | ||
# This module provides an initialization interface for logging. | ||
# | ||
### | ||
class Logging | ||
|
||
# | ||
# Initialize logging | ||
# | ||
def self.init | ||
if (@initialized != true) | ||
@initialized = true | ||
|
||
f = Rex::Logging::Sinks::Flatfile.new( | ||
Msf::Config.log_directory + File::SEPARATOR + "framework.log") | ||
|
||
# Register each known log source | ||
[ | ||
'rex', | ||
'core', | ||
].each { |src| | ||
register_log_source(src, f) | ||
} | ||
end | ||
end | ||
|
||
end | ||
|
||
end |