Results for: "Logger"

No documentation available

Coverage provides coverage measurement feature for Ruby. This feature is experimental, so these APIs may be changed in future.

Usage

  1. require “coverage”

  2. do Coverage.start

  3. require or load Ruby source file

  4. Coverage.result will return a hash that contains filename as key and coverage array as value. A coverage array gives, for each line, the number of line execution by the interpreter. A nil value means coverage is disabled for this line (lines like else and end).

Example

[foo.rb]
s = 0
10.times do |x|
  s += x
end

if s == 45
  p :ok
else
  p :ng
end
[EOF]

require "coverage"
Coverage.start
require "foo.rb"
p Coverage.result  #=> {"foo.rb"=>[1, 1, 10, nil, nil, 1, 1, nil, 0, nil]}

The syslog package provides a Ruby interface to the POSIX system logging facility.

Syslog messages are typically passed to a central logging daemon. The daemon may filter them; route them into different files (usually found under /var/log); place them in SQL databases; forward them to centralized logging servers via TCP or UDP; or even alert the system administrator via email, pager or text message.

Unlike application-level logging via Logger or Log4r, syslog is designed to allow secure tamper-proof logging.

The syslog protocol is standardized in RFC 5424.

Helper module for easily defining exceptions with predefined messages.

Usage

1.

class Foo
  extend Exception2MessageMapper
  def_e2message ExistingExceptionClass, "message..."
  def_exception :NewExceptionClass, "message..."[, superclass]
  ...
end

2.

module Error
  extend Exception2MessageMapper
  def_e2message ExistingExceptionClass, "message..."
  def_exception :NewExceptionClass, "message..."[, superclass]
  ...
end
class Foo
  include Error
  ...
end

foo = Foo.new
foo.Fail ....

3.

module Error
  extend Exception2MessageMapper
  def_e2message ExistingExceptionClass, "message..."
  def_exception :NewExceptionClass, "message..."[, superclass]
  ...
end
class Foo
  extend Exception2MessageMapper
  include Error
  ...
end

Foo.Fail NewExceptionClass, arg...
Foo.Fail ExistingExceptionClass, arg...

444 No Response - Nginx 449 Retry With - Microsoft 450 Blocked by Windows Parental Controls - Microsoft 499 Client Closed Request - Nginx

Base TCP server class. You must subclass GenericServer and provide a run method.

This exception is raised if a generator or unparser error occurs.

This class is used as a return value from ObjectSpace::reachable_objects_from.

When ObjectSpace::reachable_objects_from returns an object with references to an internal object, an instance of this class is returned.

You can use the type method to check the type of the internal object.

No documentation available
No documentation available
No documentation available

An implementation of PseudoPrimeGenerator.

Uses EratosthenesSieve.

Raised when a RSS::Maker attempts to use an unknown maker.

No documentation available

Server error exception

Raised by transcoding methods when a named encoding does not correspond with a known converter.

No documentation available

Generator

This exception is raised if a parser error occurs.

This exception is raised if the nesting of parsed data structures is too deep.

This exception is raised if a generator or unparser error occurs.

No documentation available

General error for openssl library configuration files. Including formatting, parsing errors, etc.

No documentation available

Subclass of Zlib::Error

When zlib returns a Z_VERSION_ERROR, usually if the zlib library version is incompatible with the version assumed by the caller.

Search took: 5ms  ·  Total Results: 2219