fella
Fella
Fella is an expressive HTTP log handler for Crystal.
Installation
-
Add the dependency to your
shard.yml
:dependencies: fella: github: GrottoPress/fella
-
Run
shards update
-
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.skip_if = ->(request : HTTP::Request) do
request.query_params.any? do |key, _|
!key.match(/code|password|secret|token/i).nil?
end
end
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
- Fork it
- Switch to the
master
branch:git checkout master
- Create your feature branch:
git checkout -b my-new-feature
- Make your changes, updating changelog and documentation as appropriate.
- Commit your changes:
git commit
- Push to the branch:
git push origin my-new-feature
- Submit a new Pull Request against the
GrottoPress:master
branch.
Repository
fella
Owner
Statistic
- 0
- 0
- 0
- 1
- 1
- 11 months ago
- December 20, 2023
License
MIT License
Links
Synced at
Thu, 21 Nov 2024 04:39:19 GMT
Languages