Skip to content
Browse files

Fixed a minor undef-array-index bug, updated readme

  • Loading branch information...
1 parent cb8b853 commit 997cf5dea9f522b6980d1dc0a718d773954644ea @katzgrau committed Dec 11, 2010
Showing with 9 additions and 17 deletions.
  1. +8 −16 README.markdown
  2. +1 −1 src/KLogger.php
24 README.markdown
@@ -18,24 +18,16 @@ This github project will host the development of the next version of KLogger.
The original version of KLogger is tagged as version 0.1, and is available for
download [here](
+## Basic Usage
+ $log = new KLogger('/var/log/'); # Specify the log directory
+ $log->logInfo('Returned a million search results'); //Prints to the log file
+ $log->logFatal('Oh dear.'); //Prints to the log file
## Goals
-KLogger's API will change for the better for it's 1.0 release. Expected changes
- * Adherence to the Zend Coding Standards for PHP (right now, KLogger has a
- .NET-ish member and method naming convention). The names of private
- methods will be prefixed with '_' and camel-cased, for example.
- * The implementation of a singleton pattern. A logger is likely needed in
- many parts of an application — there should be no need to instantiate
- multiple instances. You'll probably see: `$log = KLogger::instance();` in
- the near future.
- * Implementation of rolling log files. I've debated whether log files should
- based on simply the date, or both the date size of the log file. I'm
- thinking just the date will be sufficient to start.
- * Put KLogger under a specific license (which will happen below)
- * Have a bit more encapsulation of class members (and erase my cheeky
- comments about not having encapsulation)
+All of KLogger's internal goals have been met (there used to be a list here).
+If you have a feature request, send it to
## Why use KLogger?
2 src/KLogger.php
@@ -127,7 +127,7 @@ public static function instance($logDirectory = false, $severity = false)
if ($logDirectory === false) {
if (count(self::$instances) > 0) {
- return self::$instances[0];
+ return current(self::$instances);
} else {
$logDirectory = dirname(__FILE__);

0 comments on commit 997cf5d

Please sign in to comment.
Something went wrong with that request. Please try again.