Skip to content

Commit 7654110

Browse files
committed
up
1 parent bcbb7a8 commit 7654110

File tree

1 file changed

+8
-51
lines changed

1 file changed

+8
-51
lines changed

README.md

+8-51
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
[![Build Status](https://secure.travis-ci.org/geraldb/logutils.png?branch=master)](http://travis-ci.org/geraldb/logutils)
44

5-
* home :: [github.com/geraldb/logutils](https://github.com/geraldb/logutils)
6-
* bugs :: [github.com/geraldb/logutils/issues](https://github.com/geraldb/logutils)
5+
* home :: [github.com/rubylibs/logutils](https://github.com/rubylibs/logutils)
6+
* bugs :: [github.com/rubylibs/logutils/issues](https://github.com/rubylibs/logutils)
77
* gem :: [rubygems.org/gems/logutils](https://rubygems.org/gems/logutils)
88
* rdoc :: [rubydoc.info/gems/logutils](http://rubydoc.info/gems/logutils)
99

@@ -73,62 +73,19 @@ Example:
7373
end
7474

7575

76-
### Log to the database using `LogDb`
76+
### Addons / Plugins / Extensions
7777

78-
NB: To use the `LogDb` machinery require the module, that is, issue:
78+
[logutils-activerecord](https://github.com/rubylibs/logutils-activerecord) - add LogDb, Log Models, etc.
7979

80-
require 'logutils/db'
81-
82-
To create the database tables use:
83-
84-
LogDb.create
85-
86-
To start logging to the database (established connection required) use:
87-
88-
LogDb.setup
89-
90-
To clean out all log records from the database use:
91-
92-
LogDb.delete!
93-
94-
95-
### All together now
96-
97-
require 'logutils'
98-
99-
include LogUtils # lets you use Logger instead of LogUtils::Logger
100-
101-
logger = Logger[ 'Test' ]
102-
logger.info 'hello LogUtils'
103-
104-
105-
require 'logutils/db' # nb: will also require 'active_record'
106-
107-
LOG_DB_CONFIG = {
108-
:adapter => 'sqlite3',
109-
:database => './log.db'
110-
}
111-
112-
pp LOG_DB_CONFIG
113-
ActiveRecord::Base.establish_connection( LOG_DB_CONFIG )
114-
115-
LogDb.create
116-
LogDb.setup
117-
118-
logger.info 'hola LogUtils'
119-
logger.warn 'servus LogUtils'
120-
121-
122-
That's it.
12380

12481

12582
## Real World Usage
12683

127-
[world.db.ruby](https://github.com/geraldb/world.db.ruby) - `world.db` Command Line Tool
84+
[world.db.ruby](https://github.com/worlddb/world.db.ruby) - `world.db` Command Line Tool
12885

129-
[sport.db.ruby](https://github.com/geraldb/sport.db.ruby) - `sport.db` Command Line Tool
86+
[sport.db.ruby](https://github.com/sportdb/sport.db.ruby) - `sport.db` Command Line Tool
13087

131-
[Sportbook](http://geraldb.github.com/sportbook) - A free, open source sports betting pool
88+
[Sportbook](https://github.com/openbookie) - A free, open source sports betting pool
13289
in Ruby on Rails (version 3.2 and up).
13390

13491

@@ -149,4 +106,4 @@ in Ruby on Rails (version 3.2 and up).
149106
## License
150107

151108
The `logutils` scripts are dedicated to the public domain.
152-
Use it as you please with no restrictions whatsoever.
109+
Use it as you please with no restrictions whatsoever.

0 commit comments

Comments
 (0)