Skip to content

Does sprockets support logging of the build process in any manner? #814

Open
@josh-m-sharpe

Description

@josh-m-sharpe

sprockets: 4.2.1
sprockets-rails: 3.5.2
rails: 7.1

Question: Can sprockets be configured to log, or output in any manner, what it's doing while it's compiling? More specifically, can it show timestamps when it starts and finishes compiling various different assets?


This question stems from trying to understand the black box that sprockets is as it's building assets. In long-standing rails apps with many assets it becomes very difficult to diagnose compilation problems. A current app can take upwards of 2 minutes to compile assets from scratch and I have no means that I'm aware of to diagnose which components are the slow culprits. Have I accidentally included jquery a few dozen times? No idea.

I see @logger but it appears to be used sparingly. Is there any other instrumentation that exists which could be leveraged or extended to make this happen? I'm happy to hack on some things but would appreciate any direction that could be provided. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions