Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Filtering/Querying Winston Logs by String or Level #367

rturumella opened this Issue · 3 comments

5 participants



It looks like the Winston loggly-like query options only supports filtering Winston logs by timestamp. Is there some way to filter the logs by level or only show entries that contain a certain string in the loggly-like method?

Trying to avoid using grep.



I also vote for it.

If we talk about file transport then filtering by timestamp is not really important because it's more reasonable to change filename according to the current date so we have a separate file for each date (particularly daily-rotate-file transport). If we talk about DB then again every DB provides reach possibilities for querying on its own.

As far as I understand the only way to filter output is using grep for now.


quick solution if file transport :

var shelljs = require('shelljs');
var results = shelljs.grep("1393601626926", "path/to/error.log");

+1, no grep on Windows :'(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.