Revision 4b58d4fd
Added by Marc Dequènes about 15 years ago
- ID 4b58d4fd19ee646b78356e72908d4b5a6b4fda28
lib/cyborghood/base.rb | ||
---|---|---|
PRODUCT = "CyborgHood"
|
||
VERSION = "0.0.1"
|
||
|
||
class Logger < Log4r::Logger
|
||
# severities: # :dangerous :unrecoverable :ignorable
|
||
# categories:
|
||
# - db
|
||
# + ldap
|
||
# + sql
|
||
# - protocol
|
||
# + imap
|
||
# - service
|
||
# + dns
|
||
class Error < StandardError
|
||
attr_accessor :severity, :category
|
||
|
||
#include GetTextSupport
|
||
|
||
def initialize(severity, category, message)
|
||
@severity = severity
|
||
@category = category
|
||
super(message)
|
||
end
|
||
end
|
||
|
||
class Logger < Log4r::Logger
|
||
include Singleton
|
||
|
||
LOG_FORMAT = "[%5l - %d] #PREFIX#%m"
|
Also available in: Unified diff
[evol] move new classes into CyborgHood module and add new exception handling