Module: Dnsruby
- Defined in:
- lib/dnsruby.rb,
lib/dnsruby/DNS.rb,
lib/dnsruby/ipv4.rb,
lib/dnsruby/ipv6.rb,
lib/dnsruby/name.rb,
lib/dnsruby/cache.rb,
lib/dnsruby/hosts.rb,
lib/dnsruby/bitmap.rb,
lib/dnsruby/config.rb,
lib/dnsruby/dnssec.rb,
lib/dnsruby/resolv.rb,
lib/dnsruby/update.rb,
lib/dnsruby/the_log.rb,
lib/dnsruby/version.rb,
lib/dnsruby/recursor.rb,
lib/dnsruby/resolver.rb,
lib/dnsruby/key_cache.rb,
lib/dnsruby/resource/A.rb,
lib/dnsruby/bit_mapping.rb,
lib/dnsruby/code_mapper.rb,
lib/dnsruby/resource/DS.rb,
lib/dnsruby/resource/IN.rb,
lib/dnsruby/resource/KX.rb,
lib/dnsruby/resource/MX.rb,
lib/dnsruby/resource/PX.rb,
lib/dnsruby/resource/RP.rb,
lib/dnsruby/resource/RR.rb,
lib/dnsruby/resource/RT.rb,
lib/dnsruby/zone_reader.rb,
lib/dnsruby/code_mappers.rb,
lib/dnsruby/resource/APL.rb,
lib/dnsruby/resource/CAA.rb,
lib/dnsruby/resource/CDS.rb,
lib/dnsruby/resource/DLV.rb,
lib/dnsruby/resource/HIP.rb,
lib/dnsruby/resource/LOC.rb,
lib/dnsruby/resource/NXT.rb,
lib/dnsruby/resource/OPT.rb,
lib/dnsruby/resource/SOA.rb,
lib/dnsruby/resource/SPF.rb,
lib/dnsruby/resource/SRV.rb,
lib/dnsruby/resource/TXT.rb,
lib/dnsruby/resource/URI.rb,
lib/dnsruby/resource/X25.rb,
lib/dnsruby/packet_sender.rb,
lib/dnsruby/resource/AAAA.rb,
lib/dnsruby/resource/CERT.rb,
lib/dnsruby/resource/GPOS.rb,
lib/dnsruby/resource/ISDN.rb,
lib/dnsruby/resource/NSAP.rb,
lib/dnsruby/resource/NSEC.rb,
lib/dnsruby/resource/TKEY.rb,
lib/dnsruby/resource/TLSA.rb,
lib/dnsruby/resource/TSIG.rb,
lib/dnsruby/select_thread.rb,
lib/dnsruby/zone_transfer.rb,
lib/dnsruby/message/header.rb,
lib/dnsruby/resource/AFSDB.rb,
lib/dnsruby/resource/DHCID.rb,
lib/dnsruby/resource/HINFO.rb,
lib/dnsruby/resource/MINFO.rb,
lib/dnsruby/resource/NAPTR.rb,
lib/dnsruby/resource/NSEC3.rb,
lib/dnsruby/resource/RRSIG.rb,
lib/dnsruby/resource/RRSet.rb,
lib/dnsruby/resource/SSHFP.rb,
lib/dnsruby/message/decoder.rb,
lib/dnsruby/message/encoder.rb,
lib/dnsruby/message/message.rb,
lib/dnsruby/message/section.rb,
lib/dnsruby/resource/DNSKEY.rb,
lib/dnsruby/single_resolver.rb,
lib/dnsruby/single_verifier.rb,
lib/dnsruby/message/question.rb,
lib/dnsruby/resource/CDNSKEY.rb,
lib/dnsruby/resource/generic.rb,
lib/dnsruby/validator_thread.rb,
lib/dnsruby/resource/IPSECKEY.rb,
lib/dnsruby/resource/resource.rb,
lib/dnsruby/resource/NSEC3PARAM.rb,
lib/dnsruby/resource/domain_name.rb
Overview
– Copyright 2007 Nominet UK
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ++
Defined Under Namespace
Modules: BitMapping Classes: Algorithms, Bitmap, Cache, Classes, CodeMapper, Config, DNS, DecodeError, Dnssec, EncodeError, ExtendedRCode, FormErr, Header, Hosts, IPv4, IPv6, KeyCache, Message, MessageDecoder, MessageEncoder, MetaTypes, Modes, NXDomain, NXRRSet, Name, NotAuth, NotImp, NotZone, Nsec3HashAlgorithms, OpCode, OtherResolvError, PacketSender, Prefix, Prefixes, QTypes, Question, RCode, RR, RRSet, Recursor, Refused, Resolv, ResolvError, ResolvTimeout, Resolver, ResolverRuby, Section, SelectThread, ServFail, SingleResolver, SingleVerifier, SocketEofResolvError, TheLog, TsigError, TsigNotSignedResponseError, Types, Update, ValidatorThread, VerifyError, YXDomain, YXRRSet, ZoneReader, ZoneSerialError, ZoneTransfer
Constant Summary collapse
- VERSION =
'1.72.3'
- ClassHash =
:nodoc: all
{}
- @@logger =
Logger.new(STDOUT)
Class Method Summary collapse
-
.log ⇒ Object
Get the log for Dnsruby Use this to set the log level e.g.
-
.log_and_raise(object, error_class = RuntimeError) ⇒ Object
Logs (error level) and raises an error.
- .version ⇒ Object
Class Method Details
.log ⇒ Object
Get the log for Dnsruby Use this to set the log level e.g. Dnsruby.log.level = Logger::INFO
137 138 139 |
# File 'lib/dnsruby.rb', line 137 def Dnsruby.log @@logger end |
.log_and_raise(object, error_class = RuntimeError) ⇒ Object
Logs (error level) and raises an error.
143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/dnsruby.rb', line 143 def log_and_raise(object, error_class = RuntimeError) if object.is_a?(Exception) error = object Dnsruby.log.error(error.inspect) raise error else = object.to_s Dnsruby.log.error() raise error_class.new() end end |