CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/rex/logging.rb
Views: 1904
1
# -*- coding: binary -*-
2
module Rex::Logging
3
4
5
#
6
# Log severities
7
#
8
LOG_ERROR = :error
9
LOG_DEBUG = :debug
10
LOG_INFO = :info
11
LOG_WARN = :warn
12
LOG_RAW = :raw
13
14
##
15
#
16
# Log levels
17
#
18
##
19
20
#
21
# LEV_0 - Default
22
#
23
# This log level is the default log level if none is specified. It should be
24
# used when a log message should always be displayed when logging is enabled.
25
# Very few log messages should occur at this level aside from necessary
26
# information logging and error/warning logging. Debug logging at level zero
27
# is not advised.
28
#
29
LEV_0 = 0
30
31
#
32
# LEV_1 - Extra
33
#
34
# This log level should be used when extra information may be needed to
35
# understand the cause of an error or warning message or to get debugging
36
# information that might give clues as to why something is happening. This
37
# log level should be used only when information may be useful to understanding
38
# the behavior of something at a basic level. This log level should not be
39
# used in an exhaustively verbose fashion.
40
#
41
LEV_1 = 1
42
43
#
44
# LEV_2 - Verbose
45
#
46
# This log level should be used when verbose information may be needed to
47
# analyze the behavior of the framework. This should be the default log
48
# level for all detailed information not falling into LEV_0 or LEV_1.
49
# It is recommended that this log level be used by default if you are
50
# unsure.
51
#
52
LEV_2 = 2
53
54
#
55
# LEV_3 - Insanity
56
#
57
# This log level should contain very verbose information about the
58
# behavior of the framework, such as detailed information about variable
59
# states at certain phases including, but not limited to, loop iterations,
60
# function calls, and so on. This log level will rarely be displayed,
61
# but when it is the information provided should make it easy to analyze
62
# any problem.
63
#
64
LEV_3 = 3
65
66
require 'rex/logging/log_dispatcher'
67
end
68
69