Giter Site home page Giter Site logo

logs's Introduction

Logs

Gem Version CircleCI Maintainability

Mountable Rails Engine for viewing paginated logs from a browser

Installation

Add this line to your application's Gemfile:

gem 'logs'

And then execute:

$ bundle

Mount Engine:

config/routes.rb

Rails.application.routes.draw do
  mount Logs::Engine => '/logs'
end

Look up on /logs route.

Logs

License

The gem is available as open source under the terms of the MIT License.

logs's People

Contributors

dependabot-preview[bot] avatar kirillshevch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

logs's Issues

paths to css and js are incorrect

Just installed this on a Rails 5.1 app, adding the route as shown in the readme, and visiting /logs, but I'm not getting any styling or JavaScript.

Viewing the source, I can see the following:

<link rel="stylesheet" media="all" href="/stylesheets/logs/application.css" />
<script src="/javascripts/logs/application.js"></script>

I'm guessing these paths are wrong?

Not working in Rails 6.1.4.1, "The asset "logs/application.css" is not present...

Will not work in Rails 6.1.4.1. Here is the trace. I'm confused. Most mount plugins use at: '/logs' instead of => /logs`. Can you help me?

method=GET path=/logs/ format=HTML controller=Logs::LogsController action=index status=0 error='ActionView::Template::Error: The asset "logs/application.css" is not present in the asset pipeline.
' duration=21 view=0 db=0 time=08/21/21 10:26:52 resource=logs/logs#index
  
ActionView::Template::Error (The asset "logs/application.css" is not present in the asset pipeline.
):
    3:   %head
    4:     %meta(content="text/html; charset=UTF-8" http-equiv="Content-Type")
    5:     %title Logs
    6:     = stylesheet_link_tag    "logs/application", media: "all"
    7:     = javascript_include_tag "logs/application"
    8:     = csrf_meta_tags
    9:   %body
  
sprockets-rails (3.2.2) lib/sprockets/rails/helper.rb:84:in `compute_asset_path'
actionview (6.1.4) lib/action_view/helpers/asset_url_helper.rb:203:in `asset_path'
actionview (6.1.4) lib/action_view/helpers/asset_url_helper.rb:348:in `stylesheet_path'
actionview (6.1.4) lib/action_view/helpers/asset_tag_helper.rb:161:in `block in stylesheet_link_tag'
actionview (6.1.4) lib/action_view/helpers/asset_tag_helper.rb:160:in `map'
actionview (6.1.4) lib/action_view/helpers/asset_tag_helper.rb:160:in `stylesheet_link_tag'
sprockets-rails (3.2.2) lib/sprockets/rails/helper.rb:186:in `block in stylesheet_link_tag'
sprockets-rails (3.2.2) lib/sprockets/rails/helper.rb:184:in `map'
sprockets-rails (3.2.2) lib/sprockets/rails/helper.rb:184:in `stylesheet_link_tag'
logs (0.3.0) app/views/layouts/logs/application.html.haml:6
actionview (6.1.4) lib/action_view/base.rb:247:in `public_send'
actionview (6.1.4) lib/action_view/base.rb:247:in `_run'
actionview (6.1.4) lib/action_view/template.rb:154:in `block in render'
activesupport (6.1.4) lib/active_support/notifications.rb:205:in `instrument'
actionview (6.1.4) lib/action_view/template.rb:345:in `instrument_render_template'
actionview (6.1.4) lib/action_view/template.rb:152:in `render'
actionview (6.1.4) lib/action_view/renderer/template_renderer.rb:72:in `block in render_with_layout'
activesupport (6.1.4) lib/active_support/notifications.rb:203:in `block in instrument'
activesupport (6.1.4) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (6.1.4) lib/active_support/notifications.rb:203:in `instrument'
actionview (6.1.4) lib/action_view/renderer/template_renderer.rb:70:in `render_with_layout'
actionview (6.1.4) lib/action_view/renderer/template_renderer.rb:55:in `render_template'
actionview (6.1.4) lib/action_view/renderer/template_renderer.rb:11:in `render'
actionview (6.1.4) lib/action_view/renderer/renderer.rb:61:in `render_template_to_object'
actionview (6.1.4) lib/action_view/renderer/renderer.rb:29:in `render_to_object'
actionview (6.1.4) lib/action_view/rendering.rb:117:in `block in _render_template'
actionview (6.1.4) lib/action_view/base.rb:273:in `in_rendering_context'
actionview (6.1.4) lib/action_view/rendering.rb:116:in `_render_template'
actionpack (6.1.4) lib/action_controller/metal/streaming.rb:218:in `_render_template'
actionview (6.1.4) lib/action_view/rendering.rb:103:in `render_to_body'
actionpack (6.1.4) lib/action_controller/metal/rendering.rb:52:in `render_to_body'
actionpack (6.1.4) lib/action_controller/metal/renderers.rb:142:in `render_to_body'
actionpack (6.1.4) lib/abstract_controller/rendering.rb:25:in `render'
actionpack (6.1.4) lib/action_controller/metal/rendering.rb:36:in `render'
actionpack (6.1.4) lib/action_controller/metal/instrumentation.rb:46:in `block (2 levels) in render'
benchmark (0.1.1) lib/benchmark.rb:308:in `realtime'
activesupport (6.1.4) lib/active_support/core_ext/benchmark.rb:14:in `ms'
actionpack (6.1.4) lib/action_controller/metal/instrumentation.rb:46:in `block in render'
actionpack (6.1.4) lib/action_controller/metal/instrumentation.rb:86:in `cleanup_view_runtime'
activerecord (6.1.4) lib/active_record/railties/controller_runtime.rb:34:in `cleanup_view_runtime'
actionpack (6.1.4) lib/action_controller/metal/instrumentation.rb:45:in `render'
meta-tags (2.15.0) lib/meta_tags/controller_helper.rb:22:in `render'
actionpack (6.1.4) lib/action_controller/metal/implicit_render.rb:35:in `default_render'
actionpack (6.1.4) lib/action_controller/metal/basic_implicit_render.rb:6:in `block in send_action'
<internal:kernel>:90:in `tap'
actionpack (6.1.4) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
actionpack (6.1.4) lib/abstract_controller/base.rb:228:in `process_action'
actionpack (6.1.4) lib/action_controller/metal/rendering.rb:30:in `process_action'
actionpack (6.1.4) lib/abstract_controller/callbacks.rb:42:in `block in process_action'
activesupport (6.1.4) lib/active_support/callbacks.rb:117:in `block in run_callbacks'
actiontext (6.1.4) lib/action_text/rendering.rb:20:in `with_renderer'
actiontext (6.1.4) lib/action_text/engine.rb:59:in `block (4 levels) in <class:Engine>'
activesupport (6.1.4) lib/active_support/callbacks.rb:126:in `instance_exec'
activesupport (6.1.4) lib/active_support/callbacks.rb:126:in `block in run_callbacks'
activesupport (6.1.4) lib/active_support/callbacks.rb:137:in `run_callbacks'
actionpack (6.1.4) lib/abstract_controller/callbacks.rb:41:in `process_action'
actionpack (6.1.4) lib/action_controller/metal/rescue.rb:22:in `process_action'
actionpack (6.1.4) lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
activesupport (6.1.4) lib/active_support/notifications.rb:203:in `block in instrument'
activesupport (6.1.4) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (6.1.4) lib/active_support/notifications.rb:203:in `instrument'
actionpack (6.1.4) lib/action_controller/metal/instrumentation.rb:33:in `process_action'
actionpack (6.1.4) lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
activerecord (6.1.4) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
actionpack (6.1.4) lib/abstract_controller/base.rb:165:in `process'
actionview (6.1.4) lib/action_view/rendering.rb:39:in `process'
actionpack (6.1.4) lib/action_controller/metal.rb:190:in `dispatch'
actionpack (6.1.4) lib/action_controller/metal.rb:254:in `dispatch'
actionpack (6.1.4) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
actionpack (6.1.4) lib/action_dispatch/routing/route_set.rb:33:in `serve'
actionpack (6.1.4) lib/action_dispatch/journey/router.rb:50:in `block in serve'
actionpack (6.1.4) lib/action_dispatch/journey/router.rb:32:in `each'
actionpack (6.1.4) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (6.1.4) lib/action_dispatch/routing/route_set.rb:842:in `call'
railties (6.1.4) lib/rails/engine.rb:539:in `call'
railties (6.1.4) lib/rails/railtie.rb:207:in `public_send'
railties (6.1.4) lib/rails/railtie.rb:207:in `method_missing'
actionpack (6.1.4) lib/action_dispatch/routing/mapper.rb:20:in `block in <class:Constraints>'
actionpack (6.1.4) lib/action_dispatch/routing/mapper.rb:49:in `serve'
actionpack (6.1.4) lib/action_dispatch/journey/router.rb:50:in `block in serve'
actionpack (6.1.4) lib/action_dispatch/journey/router.rb:32:in `each'
actionpack (6.1.4) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (6.1.4) lib/action_dispatch/routing/route_set.rb:842:in `call'
bullet (6.1.4) lib/bullet/rack.rb:15:in `call'
rack (2.2.3) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.2.3) lib/rack/etag.rb:27:in `call'
rack (2.2.3) lib/rack/conditional_get.rb:27:in `call'
rack (2.2.3) lib/rack/head.rb:12:in `call'
actionpack (6.1.4) lib/action_dispatch/http/permissions_policy.rb:22:in `call'
actionpack (6.1.4) lib/action_dispatch/http/content_security_policy.rb:18:in `call'
rack (2.2.3) lib/rack/session/abstract/id.rb:266:in `context'
rack (2.2.3) lib/rack/session/abstract/id.rb:260:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/cookies.rb:689:in `call'
activerecord (6.1.4) lib/active_record/migration.rb:601:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
activesupport (6.1.4) lib/active_support/callbacks.rb:98:in `run_callbacks'
actionpack (6.1.4) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
better_errors (2.9.1) lib/better_errors/middleware.rb:62:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
web-console (4.1.0) lib/web_console/middleware.rb:132:in `call_app'
web-console (4.1.0) lib/web_console/middleware.rb:19:in `block in call'
web-console (4.1.0) lib/web_console/middleware.rb:17:in `catch'
web-console (4.1.0) lib/web_console/middleware.rb:17:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (6.1.4) lib/rails/rack/logger.rb:37:in `call_app'
railties (6.1.4) lib/rails/rack/logger.rb:28:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
request_store (1.5.0) lib/request_store/middleware.rb:19:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/request_id.rb:26:in `call'
rack (2.2.3) lib/rack/method_override.rb:24:in `call'
rack (2.2.3) lib/rack/runtime.rb:22:in `call'
activesupport (6.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/executor.rb:14:in `call'
rack (2.2.3) lib/rack/lock.rb:18:in `call'
rack-cache (1.12.1) lib/rack/cache/context.rb:141:in `forward'
rack-cache (1.12.1) lib/rack/cache/context.rb:267:in `fetch'
rack-cache (1.12.1) lib/rack/cache/context.rb:196:in `lookup'
rack-cache (1.12.1) lib/rack/cache/context.rb:67:in `call!'
rack-cache (1.12.1) lib/rack/cache/context.rb:52:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/static.rb:24:in `call'
rack (2.2.3) lib/rack/deflater.rb:44:in `call'
rack (2.2.3) lib/rack/sendfile.rb:110:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/ssl.rb:77:in `call'
actionpack (6.1.4) lib/action_dispatch/middleware/host_authorization.rb:98:in `call'
railties (6.1.4) lib/rails/engine.rb:539:in `call'
puma (5.4.0) lib/puma/configuration.rb:249:in `call'
puma (5.4.0) lib/puma/request.rb:77:in `block in handle_request'
puma (5.4.0) lib/puma/thread_pool.rb:340:in `with_force_shutdown'
puma (5.4.0) lib/puma/request.rb:76:in `handle_request'
puma (5.4.0) lib/puma/server.rb:440:in `process_client'
puma (5.4.0) lib/puma/thread_pool.rb:147:in `block in spawn_thread'

Security issues

Cool gem, very simple. There are a lot of security advisories. Could please merge the PRs and cut a new gem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.