Sha256: 92ce3db5ecea0ceb2d6a559ef91d94b1e96655d3a2dcd57632a616f059091a2f

Contents?: true

Size: 1.26 KB

Versions: 22

Compression:

Stored size: 1.26 KB

Contents

# Plezi's Logging

(todo: write documentation)

Inside Plezi's core code is a pure Ruby IO reactor called [Iodine](https://github.com/boazsegev/iodine), a wonderful Asynchronous Workflow Engine that allows us to enjoy both Multi-Threading and Multi-Processing.

Plezi leverages [Iodine's](https://github.com/boazsegev/iodine) logging support to help you log to both files and STDOUT (terminal screen) - either one or both

You can read more about [Iodine](https://github.com/boazsegev/iodine) and it's amazing features in it's [documentation](http://www.rubydoc.info/github/boazsegev/iodine/master).

## Setting up a Logger

Logging is based on the standard Ruby `Logger`, and replaceing the default logger (STDOUT) to a different logger (such as a file based logger), is as simple as:

```ruby
Iodine.logger = Logger.new filename
# # the same can be done using Plezi.logger, which automatically defers to Iodine.logger
# Plezi.logger = Logger.new filename
```


## Logging Helpers Methods

// to do: complete docs

### `Iodine.info`

// to do: complete docs

### `Iodine.debug`

// to do: complete docs

### `Iodine.warn`

// to do: complete docs

### `Iodine.error`

// to do: complete docs

### `Iodine.fatal`

// to do: complete docs

### `Iodine.log(raw_string)`

// to do: complete docs

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
plezi-0.12.1 docs/logging.md
plezi-0.12.0 docs/logging.md