Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Docker console logs #43

Open
modem7 opened this issue Jan 29, 2023 · 1 comment
Open

No Docker console logs #43

modem7 opened this issue Jan 29, 2023 · 1 comment

Comments

@modem7
Copy link

modem7 commented Jan 29, 2023

After spinning up the container, I do not get any output in docker logs.

image

  # CrowdSec Bouncer - Traefik
  traefik-bouncer:
    image: fbonalair/traefik-crowdsec-bouncer
    container_name: Crowdsec-Traefik-Bouncer
    networks:
      pihole:
        ipv4_address: '172.22.0.127'
    environment:
      - GIN_MODE=release # default is debug (more logs)
      - CROWDSEC_BOUNCER_API_KEY=$CROWDSEC_BOUNCER_TRAEFIK_API_KEY # sudo docker exec crowdsec cscli bouncers add traefik-bouncer
      - CROWDSEC_AGENT_HOST=crowdsec:8080 # CrowdSec host and port
      - CROWDSEC_BOUNCER_LOG_LEVEL=2 # 1 INFO 2 WARN https://pkg.go.dev/github.com/rs/zerolog#readme-leveled-logging
    security_opt:
      - no-new-privileges:true
    logging:
      driver: "local"
      options:
        max-size: 10m
        max-file: "3"
    restart: always
    mem_limit: 200m
    mem_reservation: 50m
    depends_on:
      - crowdsec

If I set the GIN_MODE to debug, I get logs, but not in release.

image

@kimdre
Copy link

kimdre commented Mar 20, 2024

This is probably already solved but just for documenation:
If you set the log level to 2 or higher, the Bouncer will only log, when the bouncer blocks an ip or an error occurred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants