How to parse (query) logs from file


#1

I write logs on file, like:

const Logger = use('Logger')

      Logger
        .transport('file')
        .error('Error has happened!', {
          url: request.url(),
          errorMessage: error.message,
          errorData: error,
        })


Then how can I query this logs?

this doesn’t work

Logger.query(options, function (err, results) {
  console.log(results);
});