2005-06-04 08:15:10 +00:00
|
|
|
#
|
|
|
|
# Log severities
|
|
|
|
#
|
|
|
|
LOG_ERROR = 'error'
|
|
|
|
LOG_DEBUG = 'debug'
|
|
|
|
LOG_INFO = 'info'
|
|
|
|
LOG_WARN = 'warn'
|
|
|
|
LOG_RAW = 'raw'
|
|
|
|
|
2005-11-15 05:22:13 +00:00
|
|
|
##
|
2005-06-04 08:15:10 +00:00
|
|
|
#
|
|
|
|
# Log levels
|
|
|
|
#
|
2005-11-15 05:22:13 +00:00
|
|
|
##
|
|
|
|
|
2012-05-24 23:10:26 +00:00
|
|
|
#
|
2005-11-15 05:22:13 +00:00
|
|
|
# LEV_0 - Default
|
|
|
|
#
|
|
|
|
# This log level is the default log level if none is specified. It should be
|
|
|
|
# used when a log message should always be displayed when logging is enabled.
|
|
|
|
# Very few log messages should occur at this level aside from necessary
|
|
|
|
# information logging and error/warning logging. Debug logging at level zero
|
|
|
|
# is not advised.
|
2005-06-04 08:15:10 +00:00
|
|
|
#
|
|
|
|
LEV_0 = 0
|
2005-11-15 05:22:13 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# LEV_1 - Extra
|
|
|
|
#
|
|
|
|
# This log level should be used when extra information may be needed to
|
|
|
|
# understand the cause of an error or warning message or to get debugging
|
2012-05-24 23:10:26 +00:00
|
|
|
# information that might give clues as to why something is happening. This
|
2005-11-15 05:22:13 +00:00
|
|
|
# log level should be used only when information may be useful to understanding
|
|
|
|
# the behavior of something at a basic level. This log level should not be
|
|
|
|
# used in an exhaustively verbose fashion.
|
|
|
|
#
|
2005-06-04 08:15:10 +00:00
|
|
|
LEV_1 = 1
|
2005-11-15 05:22:13 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# LEV_2 - Verbose
|
|
|
|
#
|
|
|
|
# This log level should be used when verbose information may be needed to
|
|
|
|
# analyze the behavior of the framework. This should be the default log
|
|
|
|
# level for all detailed information not falling into LEV_0 or LEV_1.
|
|
|
|
# It is recommended that this log level be used by default if you are
|
|
|
|
# unsure.
|
|
|
|
#
|
2005-06-04 08:15:10 +00:00
|
|
|
LEV_2 = 2
|
2005-11-15 05:22:13 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# LEV_3 - Insanity
|
|
|
|
#
|
2012-05-24 23:10:26 +00:00
|
|
|
# This log level should contain very verbose information about the
|
2005-11-15 05:22:13 +00:00
|
|
|
# behavior of the framework, such as detailed information about variable
|
|
|
|
# states at certain phases including, but not limited to, loop iterations,
|
2012-05-24 23:10:26 +00:00
|
|
|
# function calls, and so on. This log level will rarely be displayed,
|
2005-11-15 05:22:13 +00:00
|
|
|
# but when it is the information provided should make it easy to analyze
|
|
|
|
# any problem.
|
|
|
|
#
|
2005-06-04 08:15:10 +00:00
|
|
|
LEV_3 = 3
|
2005-09-29 20:18:24 +00:00
|
|
|
|
|
|
|
|
2005-11-26 00:04:26 +00:00
|
|
|
#
|
|
|
|
# Architecture constants
|
|
|
|
#
|
2008-11-13 01:55:25 +00:00
|
|
|
ARCH_ANY = '_any_'
|
|
|
|
ARCH_X86 = 'x86'
|
2009-07-22 20:14:35 +00:00
|
|
|
ARCH_X86_64 = 'x86_64'
|
2009-08-23 23:47:33 +00:00
|
|
|
ARCH_X64 = 'x64' # To be used for compatability with ARCH_X86_64
|
2008-11-13 01:55:25 +00:00
|
|
|
ARCH_MIPS = 'mips'
|
|
|
|
ARCH_MIPSLE = 'mipsle'
|
|
|
|
ARCH_MIPSBE = 'mipsbe'
|
|
|
|
ARCH_PPC = 'ppc'
|
|
|
|
ARCH_PPC64 = 'ppc64'
|
|
|
|
ARCH_CBEA = 'cbea'
|
|
|
|
ARCH_CBEA64 = 'cbea64'
|
|
|
|
ARCH_SPARC = 'sparc'
|
|
|
|
ARCH_CMD = 'cmd'
|
|
|
|
ARCH_PHP = 'php'
|
2009-01-13 06:46:32 +00:00
|
|
|
ARCH_TTY = 'tty'
|
2008-11-13 01:55:25 +00:00
|
|
|
ARCH_ARMLE = 'armle'
|
|
|
|
ARCH_ARMBE = 'armbe'
|
2009-09-27 18:35:07 +00:00
|
|
|
ARCH_JAVA = 'java'
|
2008-11-13 01:55:25 +00:00
|
|
|
ARCH_TYPES =
|
2005-11-26 00:04:26 +00:00
|
|
|
[
|
|
|
|
ARCH_X86,
|
2009-07-22 20:14:35 +00:00
|
|
|
ARCH_X86_64,
|
2005-11-26 00:04:26 +00:00
|
|
|
ARCH_MIPS,
|
2008-09-15 18:50:34 +00:00
|
|
|
ARCH_MIPSLE,
|
|
|
|
ARCH_MIPSBE,
|
2005-11-26 00:04:26 +00:00
|
|
|
ARCH_PPC,
|
2008-11-13 01:55:25 +00:00
|
|
|
ARCH_PPC64,
|
|
|
|
ARCH_CBEA,
|
|
|
|
ARCH_CBEA64,
|
2006-01-02 01:12:36 +00:00
|
|
|
ARCH_SPARC,
|
2007-09-24 03:16:50 +00:00
|
|
|
ARCH_ARMLE,
|
|
|
|
ARCH_ARMBE,
|
2006-01-02 01:12:36 +00:00
|
|
|
ARCH_CMD,
|
2009-01-13 06:46:32 +00:00
|
|
|
ARCH_PHP,
|
2009-09-27 18:35:07 +00:00
|
|
|
ARCH_TTY,
|
|
|
|
ARCH_JAVA
|
2005-11-26 00:04:26 +00:00
|
|
|
]
|
2005-12-25 22:47:38 +00:00
|
|
|
|
2006-01-02 01:12:36 +00:00
|
|
|
ARCH_ALL = ARCH_TYPES
|
2006-03-09 17:28:37 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Endian constants
|
|
|
|
#
|
|
|
|
ENDIAN_LITTLE = 0
|
|
|
|
ENDIAN_BIG = 1
|
|
|
|
|
2009-10-01 16:01:53 +00:00
|
|
|
IS_ENDIAN_LITTLE = ( [1].pack('s') == "\x01\x00" ) ? true : false
|
2008-11-13 01:55:25 +00:00
|
|
|
IS_ENDIAN_BIG = ( not IS_ENDIAN_LITTLE )
|