fella

Version, currently 0.1.04 versions

github.com/GrottoPress/fella

An expressive HTTP log handler for Crystal

0 stars
0 dependents
License: MIT

Nothing has been indexed for 0.1.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.

Installation

# Add this to your shard.yml
dependencies:
  fella:
    github: GrottoPress/fella
    version: ~> 0.1.0

Then run:

shards install

shard.yml

No shard.yml has been indexed for 0.1.0. You can read it on the repository.

Dependencies

Unknown: the shard.yml for this version has not been read yet.

README

This README is the one indexed from the repository at its latest ref, not from the tag for this version.

Fella

Fella is an expressive HTTP log handler for Crystal.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      fella:
        github: GrottoPress/fella
  2. Run shards update

  3. Require Fella:

    # ...
    require "fella"
    # ...

Usage

Pass an instance of Fella::Handler to the web server:

# ...
require "http/server"
require "fella"

Fella.configure do |settings|
  settings.request_id_header = "X-Request-ID"

  # Uses substring matching, so `token` would match `access_token`
  settings.filter_params = {"code", "password", "secret", "token"}
end

server = HTTP::Server.new([
  Fella::Handler.new(log: Log.for(MyApp)),
  # ...
])

server.bind_tcp("127.0.0.1", 8080)
server.listen
# ...

Development

Run tests with crystal spec.

Contributing

  1. Fork it
  2. Switch to the master branch: git checkout master
  3. Create your feature branch: git checkout -b my-new-feature
  4. Make your changes, updating changelog and documentation as appropriate.
  5. Commit your changes: git commit
  6. Push to the branch: git push origin my-new-feature
  7. Submit a new Pull Request against the GrottoPress:master branch.