Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • search-index search-index
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 16
    • Issues 16
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • FramasoftFramasoft
  • PeerTubePeerTube
  • search-indexsearch-index
  • Merge requests
  • !15

Fix error not logged

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Florent requested to merge fflorent/search-index:fix-errors-log-not-shown into master Feb 08, 2023
  • Overview 2
  • Commits 1
  • Pipelines 0
  • Changes 1

Fixes #46 (closed)

Pino seems to log the error with the callstack when the error is passed as the first argument.

Create a js file at the root of the project to test that:

const {logger} = require('./dist/server/helpers/logger')

logger.error({error: new Error('test')}, 'does not work')
logger.error('does not work either', {err: new Error('test')})
logger.error({err: new Error('test')}, 'works!')
logger.error(new Error('test'), 'works as well!')
Edited Feb 08, 2023 by Florent
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix-errors-log-not-shown