Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

252
Views
Suppress output from Codeship service

I'm testing a container in Codeship that requires a database. Using services in codeship-services.yml I'm linking the database container to the application container. The problem is the database container is printing a lot of output that gets mixed with the output of the tests. I want to get rid of the MongoDB logs completely but MongoDB doesn't have options to do that.

I'm currently running it with mongod --quiet --setParameter logLevel=0 but getting a lot of output still.

So I'm looking for a solution on the Codeship side to suppress output from a container (service in Codeship terms). The

logging:
    driver: none

setting from docker-compose doesn't seem to work.

Here is my codeship-services.yml:

myapp:
  build:
    dockerfile: Dockerfile
    image: myapp
  cached: true
  links:
    - database

database:
  image: mongo:3.4.3
  command: mongod --quiet --logpath /tmp/mongo.log --setParameter logLevel=0
about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

If you want to reroute the MongoDB logs to /dev/null, thereby getting rid of them entirely, you should replace the path for the log output specified by the key --logpath. For instance:

database:
  image: mongo:3.4.3
  command: mongod --quiet --logpath /dev/null
about 4 years ago · Santiago Trujillo Report

0

If you want to get rid completely of MongoDB logs, you can redirect all output of mongod command to \dev\null.

mongod --quiet --logpath /tmp/mongo.log --setParameter logLevel=0 > /dev/null 2>&1

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!