riess 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/examples/Getting_started_example.rb +17 -0
- data/lib/actions.rb +53 -0
- data/lib/checks.rb +39 -0
- data/lib/exceptions.rb +12 -0
- data/lib/finders.rb +129 -0
- data/lib/helpers.rb +115 -0
- data/lib/html_action_modules.rb +88 -0
- data/lib/html_check_modules.rb +161 -0
- data/lib/html_object_factory.rb +33 -0
- data/lib/html_objects.rb +57 -0
- data/lib/ieparser_extension.rb +416 -0
- data/lib/key_codes.rb +123 -0
- data/lib/popup.rb +57 -0
- data/lib/riess.rb +111 -0
- data/lib/test_reporter.rb +113 -0
- data/riess_stable_testing_release_1-0.0.8.gemspec +22 -0
- data/vendor/log4r-1.0.5/doc/contact.html +166 -0
- data/vendor/log4r-1.0.5/doc/contribute.html +165 -0
- data/vendor/log4r-1.0.5/doc/images/crush/logo2.png +0 -0
- data/vendor/log4r-1.0.5/doc/images/log4r-logo.png +0 -0
- data/vendor/log4r-1.0.5/doc/images/logo2.png +0 -0
- data/vendor/log4r-1.0.5/doc/index.html +228 -0
- data/vendor/log4r-1.0.5/doc/license.html +200 -0
- data/vendor/log4r-1.0.5/doc/log4r.css +111 -0
- data/vendor/log4r-1.0.5/doc/manual.html +593 -0
- data/vendor/log4r-1.0.5/doc/rdoc/blank.html +2 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r.html +105 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/BasicFormatter.html +133 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/BasicFormatter.src/M000073.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/BasicFormatter.src/M000074.html +22 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/BasicFormatter.src/M000075.html +25 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/ConfigError.html +60 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Configurator.html +151 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Configurator.src/M000003.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Configurator.src/M000004.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Configurator.src/M000005.html +25 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Configurator.src/M000006.html +19 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Configurator.src/M000007.html +19 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/DateFileOutputter.html +84 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/DateFileOutputter.src/M000010.html +33 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/DefaultFormatter.html +62 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/EmailOutputter.html +123 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/EmailOutputter.src/M000047.html +32 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/EmailOutputter.src/M000048.html +19 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/FileOutputter.html +99 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/FileOutputter.src/M000011.html +45 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Formatter.html +91 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Formatter.src/M000076.html +17 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Formatter.src/M000077.html +17 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/IOOutputter.html +112 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/IOOutputter.src/M000049.html +19 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/IOOutputter.src/M000050.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/IOOutputter.src/M000051.html +21 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Log4rTools.html +116 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Log4rTools.src/M000032.html +21 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Log4rTools.src/M000033.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Log4rTools.src/M000034.html +24 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Log4rTools.src/M000035.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/LogEvent.html +132 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/LogEvent.src/M000001.html +19 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/LogServer.html +103 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/LogServer.src/M000044.html +22 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/LogServer.src/M000045.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.html +341 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000052.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000053.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000054.html +20 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000055.html +22 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000056.html +20 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000057.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000058.html +20 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000059.html +30 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000060.html +22 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000061.html +21 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000062.html +24 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000063.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000064.html +19 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000065.html +29 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000066.html +22 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000067.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Logger.src/M000068.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/ObjectFormatter.html +85 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/ObjectFormatter.src/M000009.html +21 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.html +229 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000015.html +25 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000016.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000017.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000018.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000019.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000020.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000021.html +23 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000022.html +21 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000023.html +26 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000024.html +29 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/Outputter.src/M000025.html +17 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/PatternFormatter.html +120 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/PatternFormatter.src/M000046.html +23 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RemoteOutputter.html +104 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RemoteOutputter.src/M000012.html +22 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RemoteOutputter.src/M000013.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RemoteOutputter.src/M000014.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RollingFileOutputter.html +111 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RollingFileOutputter.src/M000069.html +45 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RootLogger.html +173 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RootLogger.src/M000036.html +23 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RootLogger.src/M000037.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RootLogger.src/M000038.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RootLogger.src/M000039.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RootLogger.src/M000040.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RootLogger.src/M000041.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RootLogger.src/M000042.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/RootLogger.src/M000043.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/SimpleFormatter.html +83 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/SimpleFormatter.src/M000026.html +19 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/StderrOutputter.html +76 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/StderrOutputter.src/M000002.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/StdoutOutputter.html +76 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/StdoutOutputter.src/M000008.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/SyslogOutputter.html +111 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/SyslogOutputter.src/M000070.html +22 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/SyslogOutputter.src/M000071.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/SyslogOutputter.src/M000072.html +21 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/YamlConfigurator.html +128 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/YamlConfigurator.src/M000027.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/YamlConfigurator.src/M000028.html +16 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/YamlConfigurator.src/M000029.html +25 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/YamlConfigurator.src/M000030.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/classes/Log4r/YamlConfigurator.src/M000031.html +18 -0
- data/vendor/log4r-1.0.5/doc/rdoc/created.rid +1 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r/configurator_rb.html +402 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r/formatter/formatter_rb.html +152 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r/formatter/patternformatter_rb.html +266 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r/logger_rb.html +320 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r/logserver_rb.html +191 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r/outputter/datefileoutputter_rb.html +120 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r/outputter/emailoutputter_rb.html +205 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r/outputter/outputter_rb.html +254 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r/outputter/syslogoutputter_rb.html +135 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r/yamlconfigurator_rb.html +120 -0
- data/vendor/log4r-1.0.5/doc/rdoc/files/log4r_rb.html +228 -0
- data/vendor/log4r-1.0.5/doc/rdoc/fr_class_index.html +59 -0
- data/vendor/log4r-1.0.5/doc/rdoc/fr_file_index.html +45 -0
- data/vendor/log4r-1.0.5/doc/rdoc/fr_method_index.html +111 -0
- data/vendor/log4r-1.0.5/doc/rdoc/index.html +26 -0
- data/vendor/log4r-1.0.5/doc/rdoc/rdoc-style.css +79 -0
- data/vendor/log4r-1.0.5/examples/README +19 -0
- data/vendor/log4r-1.0.5/examples/customlevels.rb +34 -0
- data/vendor/log4r-1.0.5/examples/fileroll.rb +40 -0
- data/vendor/log4r-1.0.5/examples/log4r_yaml.yaml +0 -0
- data/vendor/log4r-1.0.5/examples/logclient.rb +25 -0
- data/vendor/log4r-1.0.5/examples/logserver.rb +18 -0
- data/vendor/log4r-1.0.5/examples/moderate.xml +29 -0
- data/vendor/log4r-1.0.5/examples/moderateconfig.rb +66 -0
- data/vendor/log4r-1.0.5/examples/myformatter.rb +23 -0
- data/vendor/log4r-1.0.5/examples/outofthebox.rb +21 -0
- data/vendor/log4r-1.0.5/examples/rrconfig.xml +63 -0
- data/vendor/log4r-1.0.5/examples/rrsetup.rb +42 -0
- data/vendor/log4r-1.0.5/examples/simpleconfig.rb +39 -0
- data/vendor/log4r-1.0.5/examples/xmlconfig.rb +25 -0
- data/vendor/log4r-1.0.5/examples/yaml.rb +30 -0
- data/vendor/log4r-1.0.5/src/log4r.rb +20 -0
- data/vendor/log4r-1.0.5/src/log4r/base.rb +74 -0
- data/vendor/log4r-1.0.5/src/log4r/config.rb +9 -0
- data/vendor/log4r-1.0.5/src/log4r/configurator.rb +224 -0
- data/vendor/log4r-1.0.5/src/log4r/formatter/formatter.rb +105 -0
- data/vendor/log4r-1.0.5/src/log4r/formatter/patternformatter.rb +108 -0
- data/vendor/log4r-1.0.5/src/log4r/lib/drbloader.rb +52 -0
- data/vendor/log4r-1.0.5/src/log4r/lib/xmlloader.rb +24 -0
- data/vendor/log4r-1.0.5/src/log4r/logevent.rb +28 -0
- data/vendor/log4r-1.0.5/src/log4r/logger.rb +194 -0
- data/vendor/log4r-1.0.5/src/log4r/loggerfactory.rb +89 -0
- data/vendor/log4r-1.0.5/src/log4r/logserver.rb +28 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/consoleoutputters.rb +18 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/datefileoutputter.rb +110 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/emailoutputter.rb +115 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/fileoutputter.rb +49 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/iooutputter.rb +55 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/outputter.rb +132 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/outputterfactory.rb +59 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/remoteoutputter.rb +40 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/rollingfileoutputter.rb +126 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/staticoutputter.rb +30 -0
- data/vendor/log4r-1.0.5/src/log4r/outputter/syslogoutputter.rb +75 -0
- data/vendor/log4r-1.0.5/src/log4r/rdoc/configurator +243 -0
- data/vendor/log4r-1.0.5/src/log4r/rdoc/emailoutputter +103 -0
- data/vendor/log4r-1.0.5/src/log4r/rdoc/formatter +39 -0
- data/vendor/log4r-1.0.5/src/log4r/rdoc/log4r +89 -0
- data/vendor/log4r-1.0.5/src/log4r/rdoc/logger +175 -0
- data/vendor/log4r-1.0.5/src/log4r/rdoc/logserver +85 -0
- data/vendor/log4r-1.0.5/src/log4r/rdoc/outputter +108 -0
- data/vendor/log4r-1.0.5/src/log4r/rdoc/patternformatter +128 -0
- data/vendor/log4r-1.0.5/src/log4r/rdoc/syslogoutputter +29 -0
- data/vendor/log4r-1.0.5/src/log4r/rdoc/yamlconfigurator +20 -0
- data/vendor/log4r-1.0.5/src/log4r/repository.rb +65 -0
- data/vendor/log4r-1.0.5/src/log4r/staticlogger.rb +49 -0
- data/vendor/log4r-1.0.5/src/log4r/yamlconfigurator.rb +0 -0
- data/vendor/log4r-1.0.5/tests/include.rb +7 -0
- data/vendor/log4r-1.0.5/tests/runtest.rb +6 -0
- data/vendor/log4r-1.0.5/tests/testbase.rb +45 -0
- data/vendor/log4r-1.0.5/tests/testcustom.rb +33 -0
- data/vendor/log4r-1.0.5/tests/testdefault.rb +25 -0
- data/vendor/log4r-1.0.5/tests/testformatter.rb +29 -0
- data/vendor/log4r-1.0.5/tests/testlogger.rb +198 -0
- data/vendor/log4r-1.0.5/tests/testoutputter.rb +112 -0
- data/vendor/log4r-1.0.5/tests/testpatternformatter.rb +26 -0
- data/vendor/log4r-1.0.5/tests/testxmlconf.rb +51 -0
- data/vendor/log4r-1.0.5/tests/xml/testconf.xml +37 -0
- data/vendor/rspec-0.8.2/CHANGES +575 -0
- data/vendor/rspec-0.8.2/EXAMPLES.rd +81 -0
- data/vendor/rspec-0.8.2/MIT-LICENSE +20 -0
- data/vendor/rspec-0.8.2/README +57 -0
- data/vendor/rspec-0.8.2/RELEASE-PLAN +117 -0
- data/vendor/rspec-0.8.2/Rakefile +223 -0
- data/vendor/rspec-0.8.2/bin/spec +4 -0
- data/vendor/rspec-0.8.2/examples/auto_spec_name_generation_example.rb +18 -0
- data/vendor/rspec-0.8.2/examples/custom_expectation_matchers.rb +53 -0
- data/vendor/rspec-0.8.2/examples/custom_formatter.rb +11 -0
- data/vendor/rspec-0.8.2/examples/dynamic_spec.rb +9 -0
- data/vendor/rspec-0.8.2/examples/file_accessor.rb +18 -0
- data/vendor/rspec-0.8.2/examples/file_accessor_spec.rb +38 -0
- data/vendor/rspec-0.8.2/examples/greeter_spec.rb +30 -0
- data/vendor/rspec-0.8.2/examples/helper_method_example.rb +11 -0
- data/vendor/rspec-0.8.2/examples/io_processor.rb +8 -0
- data/vendor/rspec-0.8.2/examples/io_processor_spec.rb +21 -0
- data/vendor/rspec-0.8.2/examples/mocking_example.rb +27 -0
- data/vendor/rspec-0.8.2/examples/partial_mock_example.rb +28 -0
- data/vendor/rspec-0.8.2/examples/predicate_example.rb +27 -0
- data/vendor/rspec-0.8.2/examples/setup_teardown_example.rb +34 -0
- data/vendor/rspec-0.8.2/examples/spec_helper.rb +1 -0
- data/vendor/rspec-0.8.2/examples/stack.rb +36 -0
- data/vendor/rspec-0.8.2/examples/stack_spec.rb +113 -0
- data/vendor/rspec-0.8.2/examples/stubbing_example.rb +69 -0
- data/vendor/rspec-0.8.2/examples/test_case_spec.rb +63 -0
- data/vendor/rspec-0.8.2/lib/spec.rb +11 -0
- data/vendor/rspec-0.8.2/lib/spec/callback.rb +11 -0
- data/vendor/rspec-0.8.2/lib/spec/callback/callback_container.rb +60 -0
- data/vendor/rspec-0.8.2/lib/spec/callback/extensions/module.rb +24 -0
- data/vendor/rspec-0.8.2/lib/spec/callback/extensions/object.rb +37 -0
- data/vendor/rspec-0.8.2/lib/spec/deprecated.rb +3 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations.rb +59 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/differs/default.rb +62 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/errors.rb +6 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/extensions.rb +3 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/extensions/object.rb +109 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/extensions/proc.rb +57 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/extensions/string_and_symbol.rb +17 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/handler.rb +47 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/should.rb +5 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/should/base.rb +64 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/should/change.rb +69 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/should/have.rb +128 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/should/not.rb +74 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/should/should.rb +81 -0
- data/vendor/rspec-0.8.2/lib/spec/expectations/sugar.rb +47 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers.rb +160 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/be.rb +161 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/be_close.rb +37 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/change.rb +120 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/eql.rb +43 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/equal.rb +43 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/has.rb +44 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/have.rb +140 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/include.rb +50 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/match.rb +41 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/raise_error.rb +100 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/respond_to.rb +35 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/satisfy.rb +47 -0
- data/vendor/rspec-0.8.2/lib/spec/matchers/throw_symbol.rb +75 -0
- data/vendor/rspec-0.8.2/lib/spec/mocks.rb +232 -0
- data/vendor/rspec-0.8.2/lib/spec/mocks/argument_expectation.rb +132 -0
- data/vendor/rspec-0.8.2/lib/spec/mocks/error_generator.rb +85 -0
- data/vendor/rspec-0.8.2/lib/spec/mocks/errors.rb +10 -0
- data/vendor/rspec-0.8.2/lib/spec/mocks/extensions/object.rb +3 -0
- data/vendor/rspec-0.8.2/lib/spec/mocks/message_expectation.rb +231 -0
- data/vendor/rspec-0.8.2/lib/spec/mocks/methods.rb +40 -0
- data/vendor/rspec-0.8.2/lib/spec/mocks/mock.rb +26 -0
- data/vendor/rspec-0.8.2/lib/spec/mocks/mock_handler.rb +166 -0
- data/vendor/rspec-0.8.2/lib/spec/mocks/order_group.rb +29 -0
- data/vendor/rspec-0.8.2/lib/spec/rake/spectask.rb +173 -0
- data/vendor/rspec-0.8.2/lib/spec/rake/verify_rcov.rb +47 -0
- data/vendor/rspec-0.8.2/lib/spec/runner.rb +132 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/backtrace_tweaker.rb +55 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/command_line.rb +34 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/context.rb +154 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/context_eval.rb +142 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/context_runner.rb +55 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/drb_command_line.rb +21 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/execution_context.rb +17 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/extensions/kernel.rb +17 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/extensions/object.rb +32 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/formatter.rb +5 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/formatter/base_text_formatter.rb +118 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/formatter/html_formatter.rb +219 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/formatter/progress_bar_formatter.rb +27 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/formatter/rdoc_formatter.rb +22 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/formatter/specdoc_formatter.rb +23 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/heckle_runner.rb +71 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/heckle_runner_win.rb +10 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/option_parser.rb +224 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/reporter.rb +105 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/spec_matcher.rb +25 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/spec_parser.rb +41 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/spec_should_raise_handler.rb +74 -0
- data/vendor/rspec-0.8.2/lib/spec/runner/specification.rb +114 -0
- data/vendor/rspec-0.8.2/lib/spec/translator.rb +87 -0
- data/vendor/rspec-0.8.2/lib/spec/version.rb +30 -0
- data/vendor/rspec-0.8.2/spec/spec/callback/callback_container_spec.rb +27 -0
- data/vendor/rspec-0.8.2/spec/spec/callback/module_spec.rb +37 -0
- data/vendor/rspec-0.8.2/spec/spec/callback/object_spec.rb +90 -0
- data/vendor/rspec-0.8.2/spec/spec/callback/object_with_class_callback_spec.rb +19 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/differs/default_spec.rb +107 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/extensions/object_spec.rb +46 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/fail_with_spec.rb +71 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_==_spec.rb +19 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_=~_spec.rb +13 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_be_a_kind_of_spec.rb +21 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_be_an_instance_of_spec.rb +30 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_be_arbitrary_predicate_spec.rb +81 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_be_close_spec.rb +18 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_be_comparison_operator_spec.rb +44 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_be_false_spec.rb +39 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_be_spec.rb +11 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_be_true_spec.rb +27 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_change_spec.rb +184 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_eql_spec.rb +11 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_equal_spec.rb +11 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_have_at_least_spec.rb +53 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_have_at_most_spec.rb +45 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_have_key_spec.rb +21 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_have_spec.rb +64 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_include_spec.rb +59 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_match_spec.rb +25 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_==_spec.rb +15 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_be_a_kind_of_spec.rb +21 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_be_an_instance_of_spec.rb +11 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_be_arbitrary_predicate_spec.rb +68 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_be_spec.rb +11 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_change_spec.rb +24 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_eql_spec.rb +11 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_equal_spec.rb +11 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_have_key_spec.rb +15 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_include_spec.rb +58 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_match_spec.rb +11 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_raise_spec.rb +75 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_respond_to_spec.rb +15 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_not_throw_spec.rb +35 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_raise_spec.rb +66 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_respond_to_spec.rb +15 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_satisfy_spec.rb +35 -0
- data/vendor/rspec-0.8.2/spec/spec/expectations/should/should_throw_spec.rb +27 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/be_close_spec.rb +33 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/be_spec.rb +182 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/change_spec.rb +232 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/description_generation_spec.rb +147 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/eql_spec.rb +41 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/equal_spec.rb +41 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/handler_spec.rb +75 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/has_spec.rb +37 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/have_spec.rb +259 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/include_spec.rb +33 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/match_spec.rb +37 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/matcher_methods_spec.rb +85 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/raise_error_spec.rb +147 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/respond_to_spec.rb +30 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/satisfy_spec.rb +36 -0
- data/vendor/rspec-0.8.2/spec/spec/matchers/throw_symbol_spec.rb +59 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/any_number_of_times_spec.rb +34 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/argument_expectation_spec.rb +19 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/at_least_spec.rb +97 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/at_most_spec.rb +97 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/bug_report_7611_spec.rb +19 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/bug_report_7805_spec.rb +22 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/bug_report_8165_spec.rb +31 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/bug_report_8302_spec.rb +26 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/failing_mock_argument_constraints_spec.rb +74 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/mock_ordering_spec.rb +80 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/mock_spec.rb +407 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/multiple_return_value_spec.rb +113 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/null_object_mock_spec.rb +40 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/once_counts_spec.rb +56 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/options_hash_spec.rb +31 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/partial_mock_spec.rb +52 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb +64 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/passing_mock_argument_constraints_spec.rb +92 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/precise_counts_spec.rb +56 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/record_messages_spec.rb +26 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/stub_spec.rb +159 -0
- data/vendor/rspec-0.8.2/spec/spec/mocks/twice_counts_spec.rb +67 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/command_line_spec.rb +32 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/context_matching_spec.rb +28 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/context_runner_spec.rb +100 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/context_spec.rb +405 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/drb_command_line_spec.rb +74 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/execution_context_spec.rb +52 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/formatter/html_formatter_spec.rb +40 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/formatter/progress_bar_formatter_dry_run_spec.rb +21 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/formatter/progress_bar_formatter_failure_dump_spec.rb +36 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +78 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/formatter/rdoc_formatter_dry_run_spec.rb +18 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/formatter/rdoc_formatter_spec.rb +41 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/formatter/specdoc_formatter_dry_run_spec.rb +21 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/formatter/specdoc_formatter_spec.rb +46 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/heckle_runner_spec.rb +63 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/heckler_spec.rb +14 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/kernel_ext_spec.rb +16 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/noisy_backtrace_tweaker_spec.rb +45 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/object_ext_spec.rb +11 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/option_parser_spec.rb +269 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/quiet_backtrace_tweaker_spec.rb +47 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/reporter_spec.rb +126 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/spec_matcher_spec.rb +107 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/spec_name_generation_spec.rb +102 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/spec_parser_spec.rb +37 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/specification_class_spec.rb +72 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/specification_instance_spec.rb +160 -0
- data/vendor/rspec-0.8.2/spec/spec/runner/specification_should_raise_spec.rb +136 -0
- data/vendor/rspec-0.8.2/spec/spec/spec_classes.rb +102 -0
- data/vendor/rspec-0.8.2/spec/spec/translator_spec.rb +79 -0
- data/vendor/rspec-0.8.2/spec/spec_helper.rb +35 -0
- metadata +537 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
|
|
2
|
+
<html><head>
|
|
3
|
+
<title>File: formatter.rb</title>
|
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
5
|
+
<link rel=StyleSheet href="../../.././rdoc-style.css" type="text/css" media=screen>
|
|
6
|
+
<script type="text/javascript" language="JavaScript">
|
|
7
|
+
<!--
|
|
8
|
+
function popCode(url) {
|
|
9
|
+
parent.frames.source.location = url
|
|
10
|
+
}
|
|
11
|
+
//-->
|
|
12
|
+
</script>
|
|
13
|
+
</head>
|
|
14
|
+
<body bgcolor="white">
|
|
15
|
+
|
|
16
|
+
<table width="100%">
|
|
17
|
+
<tr class="title-row">
|
|
18
|
+
<td><table width="100%"><tr>
|
|
19
|
+
<td class="big-title-font" colspan=2><font size=-3><B>File</B><BR></font>formatter.rb</td>
|
|
20
|
+
<td align="right"><table cellspacing=0 cellpadding=2>
|
|
21
|
+
<tr>
|
|
22
|
+
<td class="small-title-font">Path:</td>
|
|
23
|
+
<td class="small-title-font">log4r/formatter/formatter.rb</td>
|
|
24
|
+
</tr>
|
|
25
|
+
<tr>
|
|
26
|
+
<td class="small-title-font">Modified:</td>
|
|
27
|
+
<td class="small-title-font">Mon Sep 01 15:33:20 PDT 2003</td>
|
|
28
|
+
</tr>
|
|
29
|
+
</table>
|
|
30
|
+
</td></tr></table></td>
|
|
31
|
+
</tr>
|
|
32
|
+
</table><br>
|
|
33
|
+
<!-- banner header -->
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
<div class="description"><h1>Formatters</h1>
|
|
37
|
+
<p>
|
|
38
|
+
Formatters are responsible for formatting LogEvent data. An Outputter
|
|
39
|
+
owning a Formatter will invoke the Log4r::Formatter#format method prior to
|
|
40
|
+
writing.
|
|
41
|
+
</p>
|
|
42
|
+
<h2>Available Formatters</h2>
|
|
43
|
+
<ul>
|
|
44
|
+
<li><a
|
|
45
|
+
href="../../../classes/Log4r/BasicFormatter.html">Log4r::BasicFormatter</a>
|
|
46
|
+
- default
|
|
47
|
+
|
|
48
|
+
</li>
|
|
49
|
+
<li><a
|
|
50
|
+
href="../../../classes/Log4r/PatternFormatter.html">Log4r::PatternFormatter</a>
|
|
51
|
+
- most flexible. See <a
|
|
52
|
+
href="patternformatter_rb.html">log4r/formatter/patternformatter.rb</a>
|
|
53
|
+
|
|
54
|
+
</li>
|
|
55
|
+
<li><a
|
|
56
|
+
href="../../../classes/Log4r/SimpleFormatter.html">Log4r::SimpleFormatter</a>
|
|
57
|
+
- like BasicFormatter for Strings only (low noise)
|
|
58
|
+
|
|
59
|
+
</li>
|
|
60
|
+
<li><a
|
|
61
|
+
href="../../../classes/Log4r/ObjectFormatter.html">Log4r::ObjectFormatter</a>
|
|
62
|
+
- for inspecting objects
|
|
63
|
+
|
|
64
|
+
</li>
|
|
65
|
+
<li>Log4r::NullFormatter - twirls on its feet and does nothing
|
|
66
|
+
|
|
67
|
+
</li>
|
|
68
|
+
</ul>
|
|
69
|
+
<h1>XML Configuration</h1>
|
|
70
|
+
<p>
|
|
71
|
+
Specify the Formatter and its class (as <tt>type</tt>) under an
|
|
72
|
+
<tt><outputter></tt> directive:
|
|
73
|
+
</p>
|
|
74
|
+
<pre>
|
|
75
|
+
<outputter name="someout" type="sometype">
|
|
76
|
+
<formatter type="Log4r::BasicFormatter"/>
|
|
77
|
+
</outputter>
|
|
78
|
+
</pre>
|
|
79
|
+
<p>
|
|
80
|
+
As explained in <a
|
|
81
|
+
href="../configurator_rb.html">log4r/configurator.rb</a>, the hash
|
|
82
|
+
arguments you would normally pass to <tt>new</tt> are specified as <em>XML
|
|
83
|
+
parameters</em>. Only PatternFormatter has any of these.
|
|
84
|
+
</p>
|
|
85
|
+
<h1>Custom Formatting</h1>
|
|
86
|
+
<p>
|
|
87
|
+
Building a custom Formatter is extremely easy. Just define a class that
|
|
88
|
+
extends Formatter and override the Formatter#format method. Then give it to
|
|
89
|
+
any interested Outputters.
|
|
90
|
+
</p>
|
|
91
|
+
<p>
|
|
92
|
+
If you’re interested in setting up your custom formatters in XML,
|
|
93
|
+
please take a look at <a
|
|
94
|
+
href="../configurator_rb.html">log4r/configurator.rb</a>.
|
|
95
|
+
</p>
|
|
96
|
+
<h2>Data Available</h2>
|
|
97
|
+
<p>
|
|
98
|
+
See <a href="../../../classes/Log4r/LogEvent.html">Log4r::LogEvent</a>
|
|
99
|
+
</p>
|
|
100
|
+
<table>
|
|
101
|
+
<tr><td valign="top">Version:</td><td>$Id: formatter.rb,v 1.7 2003/09/01 22:33:20 cepheus Exp $
|
|
102
|
+
|
|
103
|
+
</td></tr>
|
|
104
|
+
</table>
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
<table cellpadding=5 width="100%">
|
|
108
|
+
<tr><td class="tablesubtitle">Required files</td></tr>
|
|
109
|
+
</table><br>
|
|
110
|
+
<div class="name-list">
|
|
111
|
+
singleton
|
|
112
|
+
log4r/base
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
<table cellpadding=5 width="100%">
|
|
118
|
+
<tr><td class="tablesubtitle">Classes and Modules</td></tr>
|
|
119
|
+
</table><br>
|
|
120
|
+
Module <a href="../../../classes/Log4r.html" class="link">Log4r</a><br />
|
|
121
|
+
::Class <a href="../../../classes/Log4r/BasicFormatter.html" class="link">Log4r::BasicFormatter</a><br />
|
|
122
|
+
::Class <a href="../../../classes/Log4r/ConfigError.html" class="link">Log4r::ConfigError</a><br />
|
|
123
|
+
::Class <a href="../../../classes/Log4r/Configurator.html" class="link">Log4r::Configurator</a><br />
|
|
124
|
+
::Class <a href="../../../classes/Log4r/DateFileOutputter.html" class="link">Log4r::DateFileOutputter</a><br />
|
|
125
|
+
::Class <a href="../../../classes/Log4r/DefaultFormatter.html" class="link">Log4r::DefaultFormatter</a><br />
|
|
126
|
+
::Class <a href="../../../classes/Log4r/EmailOutputter.html" class="link">Log4r::EmailOutputter</a><br />
|
|
127
|
+
::Class <a href="../../../classes/Log4r/FileOutputter.html" class="link">Log4r::FileOutputter</a><br />
|
|
128
|
+
::Class <a href="../../../classes/Log4r/Formatter.html" class="link">Log4r::Formatter</a><br />
|
|
129
|
+
::Class <a href="../../../classes/Log4r/IOOutputter.html" class="link">Log4r::IOOutputter</a><br />
|
|
130
|
+
::Class <a href="../../../classes/Log4r/Log4rTools.html" class="link">Log4r::Log4rTools</a><br />
|
|
131
|
+
::Class <a href="../../../classes/Log4r/LogEvent.html" class="link">Log4r::LogEvent</a><br />
|
|
132
|
+
::Class <a href="../../../classes/Log4r/LogServer.html" class="link">Log4r::LogServer</a><br />
|
|
133
|
+
::Class <a href="../../../classes/Log4r/Logger.html" class="link">Log4r::Logger</a><br />
|
|
134
|
+
::Class <a href="../../../classes/Log4r/ObjectFormatter.html" class="link">Log4r::ObjectFormatter</a><br />
|
|
135
|
+
::Class <a href="../../../classes/Log4r/Outputter.html" class="link">Log4r::Outputter</a><br />
|
|
136
|
+
::Class <a href="../../../classes/Log4r/PatternFormatter.html" class="link">Log4r::PatternFormatter</a><br />
|
|
137
|
+
::Class <a href="../../../classes/Log4r/RemoteOutputter.html" class="link">Log4r::RemoteOutputter</a><br />
|
|
138
|
+
::Class <a href="../../../classes/Log4r/RollingFileOutputter.html" class="link">Log4r::RollingFileOutputter</a><br />
|
|
139
|
+
::Class <a href="../../../classes/Log4r/RootLogger.html" class="link">Log4r::RootLogger</a><br />
|
|
140
|
+
::Class <a href="../../../classes/Log4r/SimpleFormatter.html" class="link">Log4r::SimpleFormatter</a><br />
|
|
141
|
+
::Class <a href="../../../classes/Log4r/StderrOutputter.html" class="link">Log4r::StderrOutputter</a><br />
|
|
142
|
+
::Class <a href="../../../classes/Log4r/StdoutOutputter.html" class="link">Log4r::StdoutOutputter</a><br />
|
|
143
|
+
::Class <a href="../../../classes/Log4r/SyslogOutputter.html" class="link">Log4r::SyslogOutputter</a><br />
|
|
144
|
+
::Class <a href="../../../classes/Log4r/YamlConfigurator.html" class="link">Log4r::YamlConfigurator</a><br />
|
|
145
|
+
<br>
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
<!-- method descriptions -->
|
|
150
|
+
|
|
151
|
+
</body>
|
|
152
|
+
</html>
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
|
|
2
|
+
<html><head>
|
|
3
|
+
<title>File: patternformatter.rb</title>
|
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
5
|
+
<link rel=StyleSheet href="../../.././rdoc-style.css" type="text/css" media=screen>
|
|
6
|
+
<script type="text/javascript" language="JavaScript">
|
|
7
|
+
<!--
|
|
8
|
+
function popCode(url) {
|
|
9
|
+
parent.frames.source.location = url
|
|
10
|
+
}
|
|
11
|
+
//-->
|
|
12
|
+
</script>
|
|
13
|
+
</head>
|
|
14
|
+
<body bgcolor="white">
|
|
15
|
+
|
|
16
|
+
<table width="100%">
|
|
17
|
+
<tr class="title-row">
|
|
18
|
+
<td><table width="100%"><tr>
|
|
19
|
+
<td class="big-title-font" colspan=2><font size=-3><B>File</B><BR></font>patternformatter.rb</td>
|
|
20
|
+
<td align="right"><table cellspacing=0 cellpadding=2>
|
|
21
|
+
<tr>
|
|
22
|
+
<td class="small-title-font">Path:</td>
|
|
23
|
+
<td class="small-title-font">log4r/formatter/patternformatter.rb</td>
|
|
24
|
+
</tr>
|
|
25
|
+
<tr>
|
|
26
|
+
<td class="small-title-font">Modified:</td>
|
|
27
|
+
<td class="small-title-font">Mon Jan 28 08:05:05 PST 2002</td>
|
|
28
|
+
</tr>
|
|
29
|
+
</table>
|
|
30
|
+
</td></tr></table></td>
|
|
31
|
+
</tr>
|
|
32
|
+
</table><br>
|
|
33
|
+
<!-- banner header -->
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
<div class="description"><h1>PatternFormatter</h1>
|
|
37
|
+
<p>
|
|
38
|
+
PatternFormatter offers complete control over the appearance of <a
|
|
39
|
+
href="../../../classes/Log4r.html">Log4r</a> log events without having to
|
|
40
|
+
write custom Formatter classes. In order to take advantage of
|
|
41
|
+
PatternFormatter, some familarity with Kernel#sprintf or the C printf
|
|
42
|
+
function is recommended. For time formatting, please look at Time.strftime.
|
|
43
|
+
</p>
|
|
44
|
+
<p>
|
|
45
|
+
PatternFormatter accepts three hash arguments:
|
|
46
|
+
</p>
|
|
47
|
+
<table>
|
|
48
|
+
<tr><td valign="top"><tt>pattern</tt>:</td><td>Log event format string.
|
|
49
|
+
|
|
50
|
+
</td></tr>
|
|
51
|
+
<tr><td valign="top"><tt>date_pattern</tt>:</td><td>Date format string.
|
|
52
|
+
|
|
53
|
+
</td></tr>
|
|
54
|
+
<tr><td valign="top"><tt>date_method</tt>:</td><td><tt>Time</tt> method to call (instead of using date_pattern).
|
|
55
|
+
|
|
56
|
+
</td></tr>
|
|
57
|
+
</table>
|
|
58
|
+
<p>
|
|
59
|
+
The <tt>pattern</tt> format string is something like "%l [%d]
|
|
60
|
+
%80M", which resembles a pattern one would normally pass to
|
|
61
|
+
Kernel#sprintf. However, the directives are specific to <a
|
|
62
|
+
href="../../../classes/Log4r.html">Log4r</a>. Before we go on, let’s
|
|
63
|
+
cover some terminology.
|
|
64
|
+
</p>
|
|
65
|
+
<h2>Terminology</h2>
|
|
66
|
+
<dl>
|
|
67
|
+
<dt><b>%</b></dt><dd>The directive identifier. Everything after this up to and including one of
|
|
68
|
+
the <em>directive letters</em> defines a <em>directive</em>.
|
|
69
|
+
|
|
70
|
+
</dd>
|
|
71
|
+
<dt><b>directive letter</b></dt><dd>Letters in the set <tt>[cCdtmMl%]</tt>. These identify what kind of data
|
|
72
|
+
we’re interested in. They are detailed below.
|
|
73
|
+
|
|
74
|
+
</dd>
|
|
75
|
+
<dt><b>format directive</b></dt><dd>The numbers and assorted symbols that appears between <b>%</b> and a
|
|
76
|
+
<em>directive letter</em> is a format directive. It is comprised of an
|
|
77
|
+
integer specifying the field width followed optionally by a period and an
|
|
78
|
+
integer specifying the precision. The field width is the minimum number of
|
|
79
|
+
characters to copy from the data string while the precision is the maximum
|
|
80
|
+
number to copy. If the field width is preceded by a - sign, the data will
|
|
81
|
+
be left-justified. Otherwise, it is right-justified.
|
|
82
|
+
|
|
83
|
+
</dd>
|
|
84
|
+
<dt><b>directive</b></dt><dd>A statement that says, "I want this data to appear with this
|
|
85
|
+
(optional) particular format." A directive starts with a <b>%</b> and
|
|
86
|
+
is followed by a format directive and terminates in a directive letter.
|
|
87
|
+
|
|
88
|
+
</dd>
|
|
89
|
+
</dl>
|
|
90
|
+
<h2>What the Directive Letters mean</h2>
|
|
91
|
+
<dl>
|
|
92
|
+
<dt><b>c</b></dt><dd>Produces a logger’s name. Fast.
|
|
93
|
+
|
|
94
|
+
</dd>
|
|
95
|
+
<dt><b>C</b></dt><dd>Produces a logger’s full name. Fast.
|
|
96
|
+
|
|
97
|
+
</dd>
|
|
98
|
+
<dt><b>d</b></dt><dd>Produces the time in a format specified by <b>date_pattern</b> or by
|
|
99
|
+
<b>date_method</b>. If neither is specified, the default will be used
|
|
100
|
+
(ISO8601). Slow.
|
|
101
|
+
|
|
102
|
+
</dd>
|
|
103
|
+
<dt><b>t</b></dt><dd>Produces the file and line number of the log event. The appearance varies
|
|
104
|
+
by Ruby version, but it is the same output returned by Kernel#caller[0].
|
|
105
|
+
Slow.
|
|
106
|
+
|
|
107
|
+
</dd>
|
|
108
|
+
<dt><b>m</b></dt><dd>The non-inspected log message. That is, to_s called on the object passed
|
|
109
|
+
into a log method. Fast.
|
|
110
|
+
|
|
111
|
+
</dd>
|
|
112
|
+
<dt><b>M</b></dt><dd>The message formatted by the <tt><a
|
|
113
|
+
href="../../../classes/Log4r/BasicFormatter.html#M000075">format_object</a></tt>
|
|
114
|
+
method in BasicFormatter. It will pretty-print Exceptions, print Strings
|
|
115
|
+
and inspect everything else. Slow.
|
|
116
|
+
|
|
117
|
+
</dd>
|
|
118
|
+
<dt><b>l</b></dt><dd>The name of the level. That’s l as in Lambda. Fast.
|
|
119
|
+
|
|
120
|
+
</dd>
|
|
121
|
+
<dt><b>%</b></dt><dd>%% just prints a %. Any formatting is <em>probably</em> ignored. Fast.
|
|
122
|
+
|
|
123
|
+
</dd>
|
|
124
|
+
</dl>
|
|
125
|
+
<h2>Examples of directives:</h2>
|
|
126
|
+
<dl>
|
|
127
|
+
<dt><b>%d</b></dt><dd>Prints out the date according to our date_pattern or date_method. By
|
|
128
|
+
default, it looks like this: 2001-01-12 13:15:50
|
|
129
|
+
|
|
130
|
+
</dd>
|
|
131
|
+
<dt><b>%.120m</b></dt><dd>Prints out at most 120 characters of the log message.
|
|
132
|
+
|
|
133
|
+
</dd>
|
|
134
|
+
<dt><b>%15t</b></dt><dd>Prints the execution trace and pads it on the left with enough whitespace
|
|
135
|
+
to make the whole thing 15 chars.
|
|
136
|
+
|
|
137
|
+
</dd>
|
|
138
|
+
</dl>
|
|
139
|
+
<h2>Pattern String</h2>
|
|
140
|
+
<p>
|
|
141
|
+
A pattern string is simply a bunch of directives combined with the desired
|
|
142
|
+
format. For instance, to show the level in brackets followed by the date
|
|
143
|
+
and then the log message trimmed to 15 characters, we use the following
|
|
144
|
+
pattern:
|
|
145
|
+
</p>
|
|
146
|
+
<pre>
|
|
147
|
+
"[%l] %d :: %.15m" #=> [DEBUG] 2001-01-12 13:15:50 :: This is a messa
|
|
148
|
+
</pre>
|
|
149
|
+
<p>
|
|
150
|
+
To create a PatternFormatter with this format:
|
|
151
|
+
</p>
|
|
152
|
+
<pre>
|
|
153
|
+
p = PatternFormatter.new(:pattern => "[%l] %d :: %.15m")
|
|
154
|
+
</pre>
|
|
155
|
+
<h2>Formatting time</h2>
|
|
156
|
+
<p>
|
|
157
|
+
To format time, do one of the following:
|
|
158
|
+
</p>
|
|
159
|
+
<ul>
|
|
160
|
+
<li>Specify a date_pattern
|
|
161
|
+
|
|
162
|
+
</li>
|
|
163
|
+
<li>Specify what class method of Ruby’s <tt>Time</tt> class to call.
|
|
164
|
+
|
|
165
|
+
</li>
|
|
166
|
+
<li>Use the default format
|
|
167
|
+
|
|
168
|
+
</li>
|
|
169
|
+
</ul>
|
|
170
|
+
<p>
|
|
171
|
+
If neither date_pattern nor date_method is specified, the default date
|
|
172
|
+
format will be used. Currently, that would be ISO8601,
|
|
173
|
+
</p>
|
|
174
|
+
<p>
|
|
175
|
+
The date_pattern is exactly what one would pass to <tt>Time.strftime</tt>.
|
|
176
|
+
To specify a date_pattern, pass
|
|
177
|
+
<tt>:date_pattern=>"pattern"</tt> to PatternFormat.new.
|
|
178
|
+
</p>
|
|
179
|
+
<p>
|
|
180
|
+
Alternatively, date_method can be specified to produce the output of a
|
|
181
|
+
specific <tt>Time</tt> method, such as <tt>usec</tt> or <tt>to_s</tt> or
|
|
182
|
+
any other zero argument <tt>Time</tt> method that produces a time. More
|
|
183
|
+
precisely, the method to call will be invoked on <tt>Time.now</tt>. To
|
|
184
|
+
specify a date_method, pass
|
|
185
|
+
<tt>:date_method=>’methodname’</tt> (or a Symbol equivalent)
|
|
186
|
+
to <tt>PatternFormatter.new</tt>.
|
|
187
|
+
</p>
|
|
188
|
+
<h1>XML Configuration</h1>
|
|
189
|
+
<p>
|
|
190
|
+
As explained in <a
|
|
191
|
+
href="../configurator_rb.html">log4r/configurator.rb</a>, the hash
|
|
192
|
+
arguments to PatternFormatter are <em>XML parameters</em>. Here’s an
|
|
193
|
+
example:
|
|
194
|
+
</p>
|
|
195
|
+
<pre>
|
|
196
|
+
<formatter type="PatternFormatter" pattern="[%l] %d :: %.15m">
|
|
197
|
+
<date_method>usec</date_method>
|
|
198
|
+
</formatter>
|
|
199
|
+
</pre>
|
|
200
|
+
<h1>Performace considerations</h1>
|
|
201
|
+
<p>
|
|
202
|
+
The performance impact of using a particular directive letter is noted in
|
|
203
|
+
the <b>What the Directives Letters mean</b> section.
|
|
204
|
+
</p>
|
|
205
|
+
<p>
|
|
206
|
+
The performance impact of time formatting merits special attention. If you
|
|
207
|
+
aren’t aware yet, the Time class is kind of a kludge. Time.now.usec
|
|
208
|
+
happens to be faster than Time.now. If you’re concerned about
|
|
209
|
+
performance, please profile the various time methods and patterns.
|
|
210
|
+
</p>
|
|
211
|
+
<h2>Other Info</h2>
|
|
212
|
+
<table>
|
|
213
|
+
<tr><td valign="top">Version:</td><td>$Id: patternformatter.rb,v 1.2 2002/01/28 16:05:05 cepheus Exp $
|
|
214
|
+
|
|
215
|
+
</td></tr>
|
|
216
|
+
<tr><td valign="top">Author:</td><td>Leon Torres <leon@ugcs.caltech.edu>
|
|
217
|
+
|
|
218
|
+
</td></tr>
|
|
219
|
+
</table>
|
|
220
|
+
</div>
|
|
221
|
+
|
|
222
|
+
<table cellpadding=5 width="100%">
|
|
223
|
+
<tr><td class="tablesubtitle">Required files</td></tr>
|
|
224
|
+
</table><br>
|
|
225
|
+
<div class="name-list">
|
|
226
|
+
<a href="formatter_rb.html">log4r/formatter/formatter</a>
|
|
227
|
+
</div>
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
<table cellpadding=5 width="100%">
|
|
232
|
+
<tr><td class="tablesubtitle">Classes and Modules</td></tr>
|
|
233
|
+
</table><br>
|
|
234
|
+
Module <a href="../../../classes/Log4r.html" class="link">Log4r</a><br />
|
|
235
|
+
::Class <a href="../../../classes/Log4r/BasicFormatter.html" class="link">Log4r::BasicFormatter</a><br />
|
|
236
|
+
::Class <a href="../../../classes/Log4r/ConfigError.html" class="link">Log4r::ConfigError</a><br />
|
|
237
|
+
::Class <a href="../../../classes/Log4r/Configurator.html" class="link">Log4r::Configurator</a><br />
|
|
238
|
+
::Class <a href="../../../classes/Log4r/DateFileOutputter.html" class="link">Log4r::DateFileOutputter</a><br />
|
|
239
|
+
::Class <a href="../../../classes/Log4r/DefaultFormatter.html" class="link">Log4r::DefaultFormatter</a><br />
|
|
240
|
+
::Class <a href="../../../classes/Log4r/EmailOutputter.html" class="link">Log4r::EmailOutputter</a><br />
|
|
241
|
+
::Class <a href="../../../classes/Log4r/FileOutputter.html" class="link">Log4r::FileOutputter</a><br />
|
|
242
|
+
::Class <a href="../../../classes/Log4r/Formatter.html" class="link">Log4r::Formatter</a><br />
|
|
243
|
+
::Class <a href="../../../classes/Log4r/IOOutputter.html" class="link">Log4r::IOOutputter</a><br />
|
|
244
|
+
::Class <a href="../../../classes/Log4r/Log4rTools.html" class="link">Log4r::Log4rTools</a><br />
|
|
245
|
+
::Class <a href="../../../classes/Log4r/LogEvent.html" class="link">Log4r::LogEvent</a><br />
|
|
246
|
+
::Class <a href="../../../classes/Log4r/LogServer.html" class="link">Log4r::LogServer</a><br />
|
|
247
|
+
::Class <a href="../../../classes/Log4r/Logger.html" class="link">Log4r::Logger</a><br />
|
|
248
|
+
::Class <a href="../../../classes/Log4r/ObjectFormatter.html" class="link">Log4r::ObjectFormatter</a><br />
|
|
249
|
+
::Class <a href="../../../classes/Log4r/Outputter.html" class="link">Log4r::Outputter</a><br />
|
|
250
|
+
::Class <a href="../../../classes/Log4r/PatternFormatter.html" class="link">Log4r::PatternFormatter</a><br />
|
|
251
|
+
::Class <a href="../../../classes/Log4r/RemoteOutputter.html" class="link">Log4r::RemoteOutputter</a><br />
|
|
252
|
+
::Class <a href="../../../classes/Log4r/RollingFileOutputter.html" class="link">Log4r::RollingFileOutputter</a><br />
|
|
253
|
+
::Class <a href="../../../classes/Log4r/RootLogger.html" class="link">Log4r::RootLogger</a><br />
|
|
254
|
+
::Class <a href="../../../classes/Log4r/SimpleFormatter.html" class="link">Log4r::SimpleFormatter</a><br />
|
|
255
|
+
::Class <a href="../../../classes/Log4r/StderrOutputter.html" class="link">Log4r::StderrOutputter</a><br />
|
|
256
|
+
::Class <a href="../../../classes/Log4r/StdoutOutputter.html" class="link">Log4r::StdoutOutputter</a><br />
|
|
257
|
+
::Class <a href="../../../classes/Log4r/SyslogOutputter.html" class="link">Log4r::SyslogOutputter</a><br />
|
|
258
|
+
::Class <a href="../../../classes/Log4r/YamlConfigurator.html" class="link">Log4r::YamlConfigurator</a><br />
|
|
259
|
+
<br>
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
<!-- method descriptions -->
|
|
264
|
+
|
|
265
|
+
</body>
|
|
266
|
+
</html>
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
|
|
2
|
+
<html><head>
|
|
3
|
+
<title>File: logger.rb</title>
|
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
5
|
+
<link rel=StyleSheet href="../.././rdoc-style.css" type="text/css" media=screen>
|
|
6
|
+
<script type="text/javascript" language="JavaScript">
|
|
7
|
+
<!--
|
|
8
|
+
function popCode(url) {
|
|
9
|
+
parent.frames.source.location = url
|
|
10
|
+
}
|
|
11
|
+
//-->
|
|
12
|
+
</script>
|
|
13
|
+
</head>
|
|
14
|
+
<body bgcolor="white">
|
|
15
|
+
|
|
16
|
+
<table width="100%">
|
|
17
|
+
<tr class="title-row">
|
|
18
|
+
<td><table width="100%"><tr>
|
|
19
|
+
<td class="big-title-font" colspan=2><font size=-3><B>File</B><BR></font>logger.rb</td>
|
|
20
|
+
<td align="right"><table cellspacing=0 cellpadding=2>
|
|
21
|
+
<tr>
|
|
22
|
+
<td class="small-title-font">Path:</td>
|
|
23
|
+
<td class="small-title-font">log4r/logger.rb</td>
|
|
24
|
+
</tr>
|
|
25
|
+
<tr>
|
|
26
|
+
<td class="small-title-font">Modified:</td>
|
|
27
|
+
<td class="small-title-font">Wed Mar 17 11:13:07 PST 2004</td>
|
|
28
|
+
</tr>
|
|
29
|
+
</table>
|
|
30
|
+
</td></tr></table></td>
|
|
31
|
+
</tr>
|
|
32
|
+
</table><br>
|
|
33
|
+
<!-- banner header -->
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
<div class="description"><h1>Loggers</h1>
|
|
37
|
+
<p>
|
|
38
|
+
Loggers provide the interface for logging in <a
|
|
39
|
+
href="../../classes/Log4r.html">Log4r</a>. To create a logger, first come
|
|
40
|
+
up with a name for it. Good choices include the name of the class using it,
|
|
41
|
+
a service name, or the name of the file.
|
|
42
|
+
</p>
|
|
43
|
+
<p>
|
|
44
|
+
To create a logger named ‘mylog’:
|
|
45
|
+
</p>
|
|
46
|
+
<pre>
|
|
47
|
+
Logger.new('mylog')
|
|
48
|
+
</pre>
|
|
49
|
+
<p>
|
|
50
|
+
After creating a logger, it is stashed in a repository. The logger may be
|
|
51
|
+
retrieved at any time:
|
|
52
|
+
</p>
|
|
53
|
+
<pre>
|
|
54
|
+
Logger['mylog'] # get mylog back
|
|
55
|
+
</pre>
|
|
56
|
+
<p>
|
|
57
|
+
It will return nil if the logger is not found. Alternatively, if an
|
|
58
|
+
Exception is desired when a nonexistant logger is referenced, the
|
|
59
|
+
Logger#get command can be used:
|
|
60
|
+
</p>
|
|
61
|
+
<pre>
|
|
62
|
+
Logger.get('boguslog') # raises NameError if it doesn't exist
|
|
63
|
+
</pre>
|
|
64
|
+
<h2>Manipulating a Logger’s Outputters</h2>
|
|
65
|
+
<p>
|
|
66
|
+
Loggers start out with no outputters. They can be added using the
|
|
67
|
+
Logger#add method or set directly by modifying the Loggers#outputters
|
|
68
|
+
array:
|
|
69
|
+
</p>
|
|
70
|
+
<pre>
|
|
71
|
+
mylog = Logger['mylog']
|
|
72
|
+
|
|
73
|
+
# assume we've created Outputters out1 through out4
|
|
74
|
+
mylog.outputters = out1, out2
|
|
75
|
+
mylog.add(out3, out4)
|
|
76
|
+
mylog.each_outputter {|o| o.flush}
|
|
77
|
+
</pre>
|
|
78
|
+
<pre>
|
|
79
|
+
# assume out5 through out7 have names 'out5' through 'out7' resp.
|
|
80
|
+
mylog.outputters = 'out5', 'out6'
|
|
81
|
+
mylog.add('out7')
|
|
82
|
+
mylog.remove('out5','out7')
|
|
83
|
+
</pre>
|
|
84
|
+
<p>
|
|
85
|
+
Please see <a
|
|
86
|
+
href="outputter/outputter_rb.html">log4r/outputter/outputter.rb</a> and <a
|
|
87
|
+
href="../../classes/Log4r/Outputter.html">Log4r::Outputter</a> for more
|
|
88
|
+
about outputters.
|
|
89
|
+
</p>
|
|
90
|
+
<h2>Logging Methods</h2>
|
|
91
|
+
<p>
|
|
92
|
+
To log something at a certain priority, use the logging method named after
|
|
93
|
+
the lowercased priority level name:
|
|
94
|
+
</p>
|
|
95
|
+
<pre>
|
|
96
|
+
mylog.warn "This is a message with priority WARN"
|
|
97
|
+
mylog.fatal "A FATAL message"
|
|
98
|
+
</pre>
|
|
99
|
+
<p>
|
|
100
|
+
Blocks can also be logged:
|
|
101
|
+
</p>
|
|
102
|
+
<pre>
|
|
103
|
+
mylog.warn {"This is also a message with priority WARN"}
|
|
104
|
+
mylog.debug do
|
|
105
|
+
# some complicated string magic
|
|
106
|
+
return result
|
|
107
|
+
end
|
|
108
|
+
</pre>
|
|
109
|
+
<p>
|
|
110
|
+
The primary difference is that the block doesn’t get called unless
|
|
111
|
+
the Logger can log at that level. It is useful for doing computationaly
|
|
112
|
+
expensive things at a log event.
|
|
113
|
+
</p>
|
|
114
|
+
<h2>Query Methods</h2>
|
|
115
|
+
<p>
|
|
116
|
+
To ask <a href="../../classes/Log4r.html">Log4r</a> whether it is capable
|
|
117
|
+
of logging a certain level:
|
|
118
|
+
</p>
|
|
119
|
+
<pre>
|
|
120
|
+
mylog.warn? # are we logging WARN?
|
|
121
|
+
mylog.fatal? # how about FATAL?
|
|
122
|
+
</pre>
|
|
123
|
+
<p>
|
|
124
|
+
Query methods and blocks accomplish the same thing:
|
|
125
|
+
</p>
|
|
126
|
+
<pre>
|
|
127
|
+
mylog.warn "don't evaluate unless WARN is on" if mylog.warn?
|
|
128
|
+
mylog.warn {"don't evaluate unless WARN is on"}
|
|
129
|
+
</pre>
|
|
130
|
+
<h2>What About the Special Levels?</h2>
|
|
131
|
+
<p>
|
|
132
|
+
<tt>ALL</tt> and <tt>OFF</tt> can be querried, but not logged:
|
|
133
|
+
</p>
|
|
134
|
+
<pre>
|
|
135
|
+
log.off? # true iff level is OFF
|
|
136
|
+
log.all? # true iff level is ALL
|
|
137
|
+
log.all "Try to log" => Method not defined. (NameError)
|
|
138
|
+
</pre>
|
|
139
|
+
<h2>Custom Levels and Method Names</h2>
|
|
140
|
+
<p>
|
|
141
|
+
Suppose we’ve set up <a href="../../classes/Log4r.html">Log4r</a>
|
|
142
|
+
with the custom levels:
|
|
143
|
+
</p>
|
|
144
|
+
<pre>
|
|
145
|
+
Foo < Bar < Baz
|
|
146
|
+
</pre>
|
|
147
|
+
<p>
|
|
148
|
+
As one might expect, the logging methods are named after them:
|
|
149
|
+
</p>
|
|
150
|
+
<pre>
|
|
151
|
+
log.bar "something" # log at custom level Bar
|
|
152
|
+
log.bar? # are we logging at level Bar?
|
|
153
|
+
</pre>
|
|
154
|
+
<h1>Logger Inheritance</h1>
|
|
155
|
+
<p>
|
|
156
|
+
Normally, when a logger is created, its parent is set to RootLogger. If a
|
|
157
|
+
Logger’s level isn’t specified at creation, it will inherit the
|
|
158
|
+
level of its parent.
|
|
159
|
+
</p>
|
|
160
|
+
<p>
|
|
161
|
+
To specify an ancestors of a logger besides RootLogger, include the names
|
|
162
|
+
of the ancestors in order of ancestry and delimited by
|
|
163
|
+
Log4r::Log4rConfig::LoggerPathDelimiter. For example, if the delimiter is
|
|
164
|
+
the default <tt>::</tt>, our logger is ‘me’ and its ancestors
|
|
165
|
+
are ‘cain’, ‘grandpa’, and ‘pa’, we
|
|
166
|
+
create the logger like so:
|
|
167
|
+
</p>
|
|
168
|
+
<pre>
|
|
169
|
+
Logger.new('cain::grandpa::pa::me')
|
|
170
|
+
</pre>
|
|
171
|
+
<p>
|
|
172
|
+
This string is split into three compontents which can be used by a
|
|
173
|
+
Formatter to avoid parsing the name:
|
|
174
|
+
</p>
|
|
175
|
+
<table>
|
|
176
|
+
<tr><td valign="top">Logger#fullname:</td><td>The whole enchilada: ‘cain::grandpa::pa::me’
|
|
177
|
+
|
|
178
|
+
</td></tr>
|
|
179
|
+
<tr><td valign="top">Logger#name:</td><td>Just ‘me’
|
|
180
|
+
|
|
181
|
+
</td></tr>
|
|
182
|
+
</table>
|
|
183
|
+
<p>
|
|
184
|
+
To get this logger back from the repository,
|
|
185
|
+
</p>
|
|
186
|
+
<pre>
|
|
187
|
+
Logger['cain::grandpa::pa::me']
|
|
188
|
+
</pre>
|
|
189
|
+
<h1>Outputter Additivity</h1>
|
|
190
|
+
<p>
|
|
191
|
+
By default, Logger Outputters are <b>additive</b>. This means that a log
|
|
192
|
+
event will also be sent to all of a logger’s ancestors. To stop this
|
|
193
|
+
behavior, set a logger’s <tt>additive</tt> to false.
|
|
194
|
+
</p>
|
|
195
|
+
<pre>
|
|
196
|
+
Logger['foo'].additive = false
|
|
197
|
+
</pre>
|
|
198
|
+
<p>
|
|
199
|
+
A Logger’s level, additivity and trace can be changed dynamically,
|
|
200
|
+
but this is an expensive operation as the logging methods have to be
|
|
201
|
+
redefined.
|
|
202
|
+
</p>
|
|
203
|
+
<h1>RootLogger</h1>
|
|
204
|
+
<p>
|
|
205
|
+
<a href="../../classes/Log4r/RootLogger.html">Log4r::RootLogger</a> is the
|
|
206
|
+
ancestor of all loggers. Its level defines the global logging threshold.
|
|
207
|
+
Any loggers created <b>after</b> RootLogger’s level is set will not
|
|
208
|
+
log below that level. By default, RootLogger’s level is set to
|
|
209
|
+
<tt>ALL</tt>
|
|
210
|
+
</p>
|
|
211
|
+
<p>
|
|
212
|
+
RootLogger is a singleton which gets created automaticallay. It can be
|
|
213
|
+
retrieved at any time with Logger.root, Logger.global,
|
|
214
|
+
Logger[‘root’] or Logger[‘global’].
|
|
215
|
+
</p>
|
|
216
|
+
<h2>Global Level</h2>
|
|
217
|
+
<p>
|
|
218
|
+
Suppose we want <em>everything</em> to ignore events less than FATAL. We
|
|
219
|
+
can accomplish this easily:
|
|
220
|
+
</p>
|
|
221
|
+
<pre>
|
|
222
|
+
Logger.global.level = FATAL
|
|
223
|
+
</pre>
|
|
224
|
+
<p>
|
|
225
|
+
Just be sure to set this before any other Loggers or Outputters are
|
|
226
|
+
defined.
|
|
227
|
+
</p>
|
|
228
|
+
<h2>RootLogger Does Nothing</h2>
|
|
229
|
+
<p>
|
|
230
|
+
RootLogger itself behaves as if its level were permanently set to
|
|
231
|
+
<tt>OFF</tt>, thus making it a sort of null object.
|
|
232
|
+
</p>
|
|
233
|
+
<h1>XML Configuration</h1>
|
|
234
|
+
<p>
|
|
235
|
+
Please see <a href="configurator_rb.html">log4r/configurator.rb</a> for an
|
|
236
|
+
overview of XML configuratoin.
|
|
237
|
+
</p>
|
|
238
|
+
<p>
|
|
239
|
+
It’s easy to configure a Logger in XML. The following example should
|
|
240
|
+
be sufficient:
|
|
241
|
+
</p>
|
|
242
|
+
<pre>
|
|
243
|
+
...
|
|
244
|
+
<logger name="papa::mylog" level="DEBUG" trace="true">
|
|
245
|
+
<additive>false</additive>
|
|
246
|
+
<outputter>stdout</outputter>
|
|
247
|
+
<outputters>stderr, dancer, doner, blitzen</outputters>
|
|
248
|
+
</logger>
|
|
249
|
+
<logger name="papa" outputters="stderr, stdout"/>
|
|
250
|
+
...
|
|
251
|
+
</pre>
|
|
252
|
+
<p>
|
|
253
|
+
The element <tt>outputter</tt> can occur multiple times, but cannot be an
|
|
254
|
+
attribute of <tt>logger</tt>. That is, it is not an <em>XML directive</em>.
|
|
255
|
+
However, the element <tt>outputters</tt> is an <em>XML directive</em>, as
|
|
256
|
+
are all the others.
|
|
257
|
+
</p>
|
|
258
|
+
<p>
|
|
259
|
+
For more examples, check the <tt>examples</tt> directory in the <a
|
|
260
|
+
href="../../classes/Log4r.html">Log4r</a> package.
|
|
261
|
+
</p>
|
|
262
|
+
<h2>Other Info</h2>
|
|
263
|
+
<table>
|
|
264
|
+
<tr><td valign="top">Version:</td><td>$Id: logger.rb,v 1.24 2004/03/17 19:13:07 fando Exp $
|
|
265
|
+
|
|
266
|
+
</td></tr>
|
|
267
|
+
<tr><td valign="top">Author:</td><td>Leon Torres <leon(at)ugcs.caltech.edu>
|
|
268
|
+
|
|
269
|
+
</td></tr>
|
|
270
|
+
</table>
|
|
271
|
+
</div>
|
|
272
|
+
|
|
273
|
+
<table cellpadding=5 width="100%">
|
|
274
|
+
<tr><td class="tablesubtitle">Required files</td></tr>
|
|
275
|
+
</table><br>
|
|
276
|
+
<div class="name-list">
|
|
277
|
+
<a href="outputter/outputter_rb.html">log4r/outputter/outputter</a>
|
|
278
|
+
log4r/repository
|
|
279
|
+
log4r/loggerfactory
|
|
280
|
+
log4r/staticlogger
|
|
281
|
+
</div>
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
<table cellpadding=5 width="100%">
|
|
286
|
+
<tr><td class="tablesubtitle">Classes and Modules</td></tr>
|
|
287
|
+
</table><br>
|
|
288
|
+
Module <a href="../../classes/Log4r.html" class="link">Log4r</a><br />
|
|
289
|
+
::Class <a href="../../classes/Log4r/BasicFormatter.html" class="link">Log4r::BasicFormatter</a><br />
|
|
290
|
+
::Class <a href="../../classes/Log4r/ConfigError.html" class="link">Log4r::ConfigError</a><br />
|
|
291
|
+
::Class <a href="../../classes/Log4r/Configurator.html" class="link">Log4r::Configurator</a><br />
|
|
292
|
+
::Class <a href="../../classes/Log4r/DateFileOutputter.html" class="link">Log4r::DateFileOutputter</a><br />
|
|
293
|
+
::Class <a href="../../classes/Log4r/DefaultFormatter.html" class="link">Log4r::DefaultFormatter</a><br />
|
|
294
|
+
::Class <a href="../../classes/Log4r/EmailOutputter.html" class="link">Log4r::EmailOutputter</a><br />
|
|
295
|
+
::Class <a href="../../classes/Log4r/FileOutputter.html" class="link">Log4r::FileOutputter</a><br />
|
|
296
|
+
::Class <a href="../../classes/Log4r/Formatter.html" class="link">Log4r::Formatter</a><br />
|
|
297
|
+
::Class <a href="../../classes/Log4r/IOOutputter.html" class="link">Log4r::IOOutputter</a><br />
|
|
298
|
+
::Class <a href="../../classes/Log4r/Log4rTools.html" class="link">Log4r::Log4rTools</a><br />
|
|
299
|
+
::Class <a href="../../classes/Log4r/LogEvent.html" class="link">Log4r::LogEvent</a><br />
|
|
300
|
+
::Class <a href="../../classes/Log4r/LogServer.html" class="link">Log4r::LogServer</a><br />
|
|
301
|
+
::Class <a href="../../classes/Log4r/Logger.html" class="link">Log4r::Logger</a><br />
|
|
302
|
+
::Class <a href="../../classes/Log4r/ObjectFormatter.html" class="link">Log4r::ObjectFormatter</a><br />
|
|
303
|
+
::Class <a href="../../classes/Log4r/Outputter.html" class="link">Log4r::Outputter</a><br />
|
|
304
|
+
::Class <a href="../../classes/Log4r/PatternFormatter.html" class="link">Log4r::PatternFormatter</a><br />
|
|
305
|
+
::Class <a href="../../classes/Log4r/RemoteOutputter.html" class="link">Log4r::RemoteOutputter</a><br />
|
|
306
|
+
::Class <a href="../../classes/Log4r/RollingFileOutputter.html" class="link">Log4r::RollingFileOutputter</a><br />
|
|
307
|
+
::Class <a href="../../classes/Log4r/RootLogger.html" class="link">Log4r::RootLogger</a><br />
|
|
308
|
+
::Class <a href="../../classes/Log4r/SimpleFormatter.html" class="link">Log4r::SimpleFormatter</a><br />
|
|
309
|
+
::Class <a href="../../classes/Log4r/StderrOutputter.html" class="link">Log4r::StderrOutputter</a><br />
|
|
310
|
+
::Class <a href="../../classes/Log4r/StdoutOutputter.html" class="link">Log4r::StdoutOutputter</a><br />
|
|
311
|
+
::Class <a href="../../classes/Log4r/SyslogOutputter.html" class="link">Log4r::SyslogOutputter</a><br />
|
|
312
|
+
::Class <a href="../../classes/Log4r/YamlConfigurator.html" class="link">Log4r::YamlConfigurator</a><br />
|
|
313
|
+
<br>
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
<!-- method descriptions -->
|
|
318
|
+
|
|
319
|
+
</body>
|
|
320
|
+
</html>
|