Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

composify KLogger #28

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ src/test.php
test/
test/*
test.php

/vendor/
64 changes: 22 additions & 42 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,64 +1,44 @@
# KLogger: A Simple Logging Class For PHP
# eklogger: A logging class for PHP

A project written by Kenny Katzgrau and originally hosted at
[CodeFury.net](http://codefury.net/projects/klogger/). This marks the
development of a newer version of KLogger.
eklogger is a simple yet powerful logging class for PHP

eklogger is based on [KLogger](https://github.com/katzgrau/Klogger) written by
[Kenny Katzgrau](http://codefury.net/projects/klogger/).

## About

KLogger is an easy-to-use logging class for PHP. It supports standard log levels
eklogger is an easy-to-use logging class for PHP. It supports standard log levels
like debug, info, warn, error, and fatal. Additionally, it isn't naive about
file permissions (which is expected). It was meant to be a class that you could
quickly include into a project and have working right away.

The class was written in 2008, but I have since received a number of emails both
saying 'thanks' and asking me to add features.

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](http://github.com/katzgrau/KLogger/downloads).

## Basic Usage
file permissions (which is expected). It also provides output to STDOUT.

$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
$log->logInfo('Here is an object', $obj); //Prints to the log file with a dump of the object

## Goals
## Installation

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 katzgrau@gmail.com
Use [composer](http://getcomposer.org) and add eklogger to your composer.json to use it:

## Why use KLogger?
require: {
...
"deralex/eklogger": "*",
...
}

Why not? Just drop it in and go. If it saves you time and does what you need,
go for it! Take a line from the book of our C-code fathers: "`build` upon the
work of others".
Then hit `composer install` to get eklogger.

## Who uses KLogger?

Klogger has been used in projects at:

* The University of Iowa
* The University of Laverne
* The New Jersey Institute of Technology
* Middlesex Hospital in NJ

Additionally, it's been used in numerous projects, both commercial and personal.
## Basic Usage

## Special Thanks
use DerAlex\eklogger\EKLogger;

Special thanks to all contributors, which right now includes three people:
$log = new EKLogger('/tmp/', EKLogger::INFO); # Specify the log directory and minimum severity level
$log->info('Returned a million search results'); //Prints to the log file
$log->fatal('Oh dear.'); //Prints to the log file
$log->info('Here is an object', $obj); //Prints to the log file with a dump of the object

[Tim Kinnane](http://twitter.com/etherealtim)
[Brian Fenton](http://github.com/fentie)
[Cameron Will](https://github.com/cwill747)

## License

The MIT License

Copyright (c) 2014 Alexander Kluth <contact@alexanderkluth.com>
Copyright (c) 2008-2010 Kenny Katzgrau <katzgrau@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
24 changes: 24 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "deralex/eklogger",
"description": "A simple yet powerful logging class",
"license": "MIT",
"authors": [
{
"name": "Alexander Kluth",
"email": "contact@alexanderkluth.com"
},
{
"name": "Kenny Katzgrau",
"email": "katzgrau@gmail.com"
}
],
"autoload": {
"psr-0": { "DerAlex\\EKLogger": "src" }
},
"require": {

},
"require-dev": {
"phpspec/phpspec": "2.0.x-dev"
}
}
Loading