Skip to content

Commit

Permalink
Update documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Nov 18, 2019
1 parent d77bb23 commit e995da3
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ Capturing structured information allows it to be used in different ways. These e

Generally speaking, use `Console.logger` which is suitable for logging to the user's terminal.

### Environment Variables

#### `CONSOLE_LEVEL=debug`

Control the default logger level. You can set it to any of the supported log levels: `debug`, `info`, `warn`, `error`, `fatal`.

#### `CONSOLE_DEBUG=MyClass,MyModule::MyClass`

Enable debug logging for the specified class names. You can specify one or more class names which will be resolved at runtime.

### Module Integration

```ruby
Expand Down Expand Up @@ -128,8 +138,8 @@ require 'console'

MyLogger = Console::Filter[noise: 0, stuff: 1, broken: 2]

logger = MyLogger.new(Console.logger, name: "Java")
logger.verbose! # log severity/name/pid etc.
# verbose: true - log severity/name/pid etc.
logger = MyLogger.new(Console.logger, name: "Java", verbose: true)

logger.broken("It's so janky.")
```
Expand Down

0 comments on commit e995da3

Please sign in to comment.