npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cl-print

v3.0.2

Published

In Version3 , we added color and only print feature

Readme

🌟 cl-print - Log with Filename & Line Number

cl-print is a lightweight and powerful npm package that enhances your console logging by automatically adding filename and line number to each log statement. With this package, debugging becomes a breeze as you can immediately see where your logs are coming from.


🚀 Features

  • ✨ Automatically prepends the filename and line number to every console.log statement.
  • 🎯 No manual effort required to track logs.
  • 🛠️ Works out of the box, just replace console.log with clPrint.
  • 🧑‍💻 Helps in debugging by providing clear and concise context.

📦 Installation

You can easily install cl-print via npm:

npm install cl-print

🖥️ Usage

Once installed, just require or import the package and use it like you would use console.log.

Example

const {cl} = require('cl-print');

cl('Hello, World!'); 
// Output: [xyz.js:15] Hello, World!

In this example, the log message will display the filename (xyz.js) and the line number (15), showing exactly where the log was made.


💡 Sample Output

Suppose you have a file app.js with the following code:

const {cl} = require('cl-print');

function greet() {
  cl('Hello, this is a test log!');
}

greet();

The output in your console will look like:

[app.js:4] Hello, this is a test log!

As you can see, it includes the filename (app.js) and the line number (4), making it incredibly easy to track the source of your log.


🔥 Why Choose cl-print?

  • Instant Context: Get a clear picture of where your logs are being triggered without any extra effort.
  • Simplified Debugging: No more guessing or searching for log statements — it's all right there.
  • Zero Configuration: Just install and use it like console.log, and you're good to go.
  • Perfect for Teams: Everyone on the team can easily identify log origins, which improves collaboration and productivity.

🎉 Quick Start

const {cl} = require('cl-print');

// Using it like console.log, but with filename and line number
cl('This is a log with context!');

Output:

[app.js:10] This is a log with context!

🤝 Contributing

We welcome contributions! If you find bugs, or want to add features, feel free to fork the repository and submit a pull request. Here's how you can contribute:

  1. Fork this repository
  2. Create a new branch (git checkout -b feature-branch)
  3. Make your changes
  4. Commit your changes (git commit -am 'Add new feature')
  5. Push to the branch (git push origin feature-branch)
  6. Submit a pull request

📄 License

This project is licensed under the MIT License. See the LICENSE file for more details.


👨‍💻 Author

Developed and maintained by Krishna Kumar. Feel free to reach out for questions, suggestions, or collaborations! 😄

🔑 Keywords console.log debugging log developer-tools debug filename line-number nodejs logging log-with-context nodejs-logging console-enhancer cl-print