Permalink
Browse files

correct spelling in a variety of places

  • Loading branch information...
1 parent 4c7c6ef commit a8a1dcd4e68ad13b984bf9331d9e68f669b35521 Simon Chiang committed Oct 28, 2011
View
@@ -2,7 +2,7 @@
#
# Logging provides a simple, default logger configured in the same manner as
# the default Ruby Logger class -- i.e. the output of the two will be the
-# same. All log messags at "warn" or higher are printed to STDOUT; any
+# same. All log messages at "warn" or higher are printed to STDOUT; any
# message below the "warn" level are discarded.
#
View
@@ -192,8 +192,8 @@ def reopen
#
# If the "root" logger name is passed to this method then all loggers
# will consolidate to the root logger. In other words, only the root
- # logger will be created, and it will be used by all classes and moduels
- # in the applicaiton.
+ # logger will be created, and it will be used by all classes and modules
+ # in the application.
#
# ==== Example
#
@@ -363,7 +363,7 @@ def version
end
# Returns the library path for the module. If any arguments are given,
- # they will be joined to the end of the libray path using
+ # they will be joined to the end of the library path using
# <tt>File.join</tt>.
#
def libpath( *args, &block )
@@ -419,7 +419,7 @@ def path( *args, &block )
#
# 1) name - the name of the logger
#
- # 2) level - the logger level; if it is preceeded by an
+ # 2) level - the logger level; if it is preceded by an
# asterisk then the level was explicitly set for that
# logger (as opposed to being inherited from the parent
# logger)
@@ -470,7 +470,7 @@ def show_configuration( io = STDOUT, logger = 'root', indent = 0 )
end
# :stopdoc:
- # Convert the given level into a connaconical form - a lowercase string.
+ # Convert the given level into a canonical form - a lowercase string.
def levelify( level )
case level
when String; level.downcase
View
@@ -122,7 +122,7 @@ def <<( str )
# appender.level = 'off'
# appender.level = :all
#
- # These prodcue an +ArgumentError+
+ # These produce an +ArgumentError+
#
# appender.level = Object
# appender.level = -1
View
@@ -74,7 +74,7 @@ def syslog( *args )
# call-seq:
# Appenders[name]
#
- # Returns the appender instance stroed in the appender hash under the
+ # Returns the appender instance stored in the appender hash under the
# key _name_, or +nil+ if no appender has been created using that name.
#
def []( name ) @appenders[name] end
@@ -43,7 +43,7 @@ def initialize( *args, &block )
super(*args, &block)
end
- # Close the message buffer by flusing all log events to the appender. If a
+ # Close the message buffer by flushing all log events to the appender. If a
# periodic flusher thread is running, shut it down and allow it to exit.
#
def close( *args )
@@ -58,7 +58,7 @@ def close( *args )
super(*args)
end
- # Reopen the connection to the underlying logging destination. In addtion
+ # Reopen the connection to the underlying logging destination. In addition
# if the appender is configured for periodic flushing, then the flushing
# thread will be stopped and restarted.
#
@@ -91,8 +91,8 @@ def flush
# even though it is a higher level. Both must be explicitly passed to
# this assignment.
#
- # You can pass in a single leveal name or number, and array of level
- # names or numbers, or a string containg a comma separated list of level
+ # You can pass in a single level name or number, an array of level
+ # names or numbers, or a string containing a comma separated list of level
# names or numbers.
#
# immediate_at = :error
@@ -132,8 +132,8 @@ def immediate_at=( level )
# nil OR
# 0 : only flush when the buffer is full (500 messages)
#
- # If the default buffer size of 500 is too small, you can manuall
- # configure to be as large as you want. This will consume more memory.
+ # If the default buffer size of 500 is too small, then you can manually
+ # configure it to be as large as you want. This will consume more memory.
#
# auto_flushing = 42_000
#
@@ -274,7 +274,7 @@ def _parse_numeric( str )
# Using the flush_period, create a new PeriodicFlusher attached to this
# appender. If the flush_period is nil, then no action will be taken. If a
- # PeriodicFlusher alreayd exists, it will be stopped and a new one will be
+ # PeriodicFlusher already exists, it will be stopped and a new one will be
# created.
#
def _setup_periodic_flusher
@@ -2,7 +2,7 @@
require 'net/smtp'
require 'time' # get rfc822 time format
-# a replacement EmailOutputter. This is essentially the default EmailOutptter from Log4r but with the following
+# a replacement EmailOutputter. This is essentially the default EmailOutputter from Log4r but with the following
# changes:
# 1) if there is data to send in an email, then do not send anything
# 2) connect to the smtp server at the last minute, do not connect at startup and then send later on.
@@ -37,7 +37,7 @@ def self.assert_valid_logfile( fn )
# logging destination. If the file does not already exist it will be
# created. If the :truncate option is set to +true+ then the file will
# be truncated before writing begins; otherwise, log messages will be
- # appened to the file.
+ # appended to the file.
#
def initialize( name, opts = {} )
@fn = opts.getopt(:filename, name)
@@ -49,7 +49,7 @@ def initialize( name, opts = {} )
# notification levels. This is needed in order to log events at the
# proper Growl level.
#
- # Without any configuration, the following maping will be used:
+ # Without any configuration, the following mapping will be used:
#
# :debug => -2
# :info => -1
@@ -73,7 +73,7 @@ def map=( levels )
# write( event )
#
# Write the given _event_ to the growl notification facility. The log
- # event will be processed through the Layout assciated with this
+ # event will be processed through the Layout associated with this
# appender. The message will be logged at the level specified by the
# event.
#
@@ -256,7 +256,7 @@ def roll_files
files = Dir.glob(@glob).find_all {|fn| @rgxp =~ fn}
unless files.empty?
- # sort the files in revese order based on their count number
+ # sort the files in reverse order based on their count number
files = files.sort do |a,b|
a = Integer(@rgxp.match(a)[1])
b = Integer(@rgxp.match(b)[1])
@@ -274,7 +274,7 @@ def roll_files
end
end
- # finally reanme the copied log file
+ # finally rename the copied log file
::File.rename(@fn_copy, sprintf(@logname_fmt, 1))
ensure
@roll = false
@@ -307,7 +307,7 @@ def initialize( fn, opts )
def roll_files
return unless @roll and ::File.exist?(@fn_copy)
- # reanme the copied log file
+ # rename the copied log file
::File.rename(@fn_copy, Time.now.strftime(@logname_fmt))
# prune old log files
@@ -12,7 +12,7 @@ class StringIo < ::Logging::Appenders::IO
# call-seq:
# StringIo.new( name, opts = {} )
#
- # Creates a new StrinIo appender that will append log messages to a
+ # Creates a new StringIo appender that will append log messages to a
# StringIO instance.
#
def initialize( name, opts = {} )
@@ -107,7 +107,7 @@ def initialize( name, opts = {} )
# Configure the mapping from the Logging levels to the syslog levels.
# This is needed in order to log events at the proper syslog level.
#
- # Without any configuration, the following maping will be used:
+ # Without any configuration, the following mapping will be used:
#
# :debug => LOG_DEBUG
# :info => LOG_INFO
@@ -127,7 +127,7 @@ def map=( levels )
# call-seq:
# close
#
- # Closes the connetion to the syslog facility.
+ # Closes the connection to the syslog facility.
#
def close( footer = true )
super
@@ -168,7 +168,7 @@ def reopen
# write( event )
#
# Write the given _event_ to the syslog facility. The log event will be
- # processed through the Layout assciated with this appender. The message
+ # processed through the Layout associated with this appender. The message
# will be logged at the level specified by the event.
#
def write( event )
@@ -17,13 +17,13 @@ module Logging
# ColorScheme objects are used by the Pattern layout code to colorize log
# messages. Each color scheme is given a unique name which is used by the
# Pattern layout to lookup the appropriate color scheme to use. Please
- # refere to the Pattern layout documentation for more details - specifically
+ # refer to the Pattern layout documentation for more details - specifically
# the initializer documentation.
#
# The color scheme can be applied to the Pattern layout in several ways.
# Each token in the log pattern can be colorized with the log level (debug,
# info, warn, etc) receiving unique colors based on the level itself.
- # Another option is to colorize the enitre log message based on the log
+ # Another option is to colorize the entire log message based on the log
# level; in this mode tokens do not get their own colors. Please see the
# ColorScheme initializer for the list of colorization options.
#
@@ -71,7 +71,7 @@ def reset
# end of this file. Multiple color codes can be aliased by grouping them
# in an array as shown in the example above.
#
- # Since color schems are primary inteneded to be used with the Pattern
+ # Since color schemes are primary intended to be used with the Pattern
# layout, there are a few special options of note. First the log levels
# are enumerated in their own hash:
#
@@ -85,7 +85,7 @@ def reset
#
# The log level token will be colorized differently based on the value of
# the log level itself. Similarly the entire log message can be colorized
- # based on the value of the log level. A dfferent option should be given
+ # based on the value of the log level. A different option should be given
# for this behavior:
#
# :lines => {
@@ -10,7 +10,7 @@ class Configurator
class Error < StandardError; end # :nodoc:
# call-seq:
- # Configuraotr.process( &block )
+ # Configurator.process( &block )
#
def self.process( &block )
new.load(&block)
View
@@ -52,7 +52,7 @@ def initialize( opts = {} )
# call-seq:
# format( event )
#
- # Returns a string representation of the given loggging _event_. It is
+ # Returns a string representation of the given logging _event_. It is
# up to subclasses to implement this method.
#
def format( event ) nil end
@@ -77,7 +77,7 @@ def footer( ) '' end
#
# Return a string representation of the given object. Depending upon
# the configuration of the logger system the format will be an +inspect+
- # based represenation or a +yaml+ based representation.
+ # based representation or a +yaml+ based representation.
#
def format_obj( obj )
case obj
@@ -17,7 +17,7 @@ class Basic < ::Logging::Layout
# call-seq:
# format( event )
#
- # Returns a string representation of the given loggging _event_. See the
+ # Returns a string representation of the given logging _event_. See the
# class documentation for details about the formatting used.
#
def format( event )
@@ -132,7 +132,7 @@ def self.create_json_format_method( layout )
# call-seq:
# Parseable.json( opts )
#
- # Create a new Parseable layout that outputs log events usig JSON style
+ # Create a new Parseable layout that outputs log events using JSON style
# formatting. See the initializer documentation for available options.
#
def self.json( opts = {} )
@@ -143,7 +143,7 @@ def self.json( opts = {} )
# call-seq:
# Parseable.yaml( opts )
#
- # Create a new Parseable layout that outputs log events usig YAML style
+ # Create a new Parseable layout that outputs log events using YAML style
# formatting. See the initializer documentation for available options.
#
def self.yaml( opts = {} )
View
@@ -75,7 +75,7 @@ def new( *args )
# This is where the actual logging methods are defined. Two methods
# are created for each log level. The first is a query method used to
- # determine if that perticular logging level is enabled. The second is
+ # determine if that particular logging level is enabled. The second is
# the actual logging method that accepts a list of objects to be
# logged or a block. If a block is given, then the object returned
# from the block will be logged.
@@ -194,7 +194,7 @@ def <<( msg )
#
# <b>Message format</b>: +message+ can be any object, but it has to be
# converted to a String in order to log it. The Logging::format_as
- # method is used to determine how objects chould be converted to
+ # method is used to determine how objects should be converted to
# strings. Generally, +inspect+ is used.
#
# A special case is an +Exception+ object, which will be printed in
@@ -280,7 +280,7 @@ def level
# log.level = 'off'
# log.level = :all
#
- # These prodcue an +ArgumentError+
+ # These produce an +ArgumentError+
#
# log.level = Object
# log.level = -1
View
@@ -17,7 +17,7 @@ module Logging
# result # <-- always return the result
# end
#
- # The proxied object is avaiable as the "@object" variable. The logger is
+ # The proxied object is available as the "@object" variable. The logger is
# available as the "@logger" variable.
#
class Proxy
@@ -14,7 +14,7 @@ module RailsCompat
# A no-op implementation of the +silence+ method. Setting of log levels
# should be done during the Logging configuration. It is the author's
- # opinion that overriding the log level programmaticaly is a logical
+ # opinion that overriding the log level programmatically is a logical
# error.
#
# Please see https://github.com/TwP/logging/issues/11 for a more detail
@@ -3,7 +3,7 @@ module Logging
# The root logger exists to ensure that all loggers have a parent and a
# defined logging level. If a logger is additive, eventually its log
- # events will propogate up to the root logger.
+ # events will propagate up to the root logger.
#
class RootLogger < Logger
View
@@ -40,7 +40,7 @@ def reset
# Coalesce the statistics from the _other_ sampler into this one. The
# _other_ sampler is not modified by this method.
#
- # Coalescing the same two samplers mutliple times should only be done if
+ # Coalescing the same two samplers multiple times should only be done if
# one of the samplers is reset between calls to this method. Otherwise
# statistics will be counted multiple times.
#
@@ -148,7 +148,7 @@ class Tracker
attr_reader :stats
- # Create a new Tracker instance. An optional boolean can be bassed in to
+ # Create a new Tracker instance. An optional boolean can be passed in to
# change the "threadsafe" value of the tracker. By default all trackers
# are created to be threadsafe.
#
@@ -163,7 +163,7 @@ def initialize( threadsafe = true )
# Coalesce the samplers from the _other_ tracker into this one. The
# _other_ tracker is not modified by this method.
#
- # Coalescing the same two trackers mutliple times should only be done if
+ # Coalescing the same two trackers multiple times should only be done if
# one of the trackers is reset between calls to this method. Otherwise
# statistics will be counted multiple times.
#
@@ -4,7 +4,7 @@ module LoggingHelper
# Capture log messages from the Logging framework and make them
# available via a @log_output instance variable. The @log_output
- # supports a readline method to access the log messags.
+ # supports a readline method to access the log messages.
#
def capture_log_messages( opts = {} )
from = opts.getopt(:from, 'root')

0 comments on commit a8a1dcd

Please sign in to comment.