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

fmt is not defined. #90

Open
whizzzkid opened this issue Sep 4, 2023 · 1 comment
Open

fmt is not defined. #90

whizzzkid opened this issue Sep 4, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@whizzzkid
Copy link

Summary

2023-09-04.10:08:31 [STARTING] ** [traefik-cloudflare-companion] [88] Starting Traefik Cloudflare Companion
Traceback (most recent call last):
  File "/usr/sbin/cloudflare-companion", line 68, in <module>
    formatter = logging.Formatter(fmt, date_fmt)
                                  ^^^
NameError: name 'fmt' is not defined

Steps to reproduce

:latest container images from docker hub fail

What is the expected correct behavior?

should not fail.

Relevant logs and/or screenshots

Environment

  • Image version / tag: lates
  • Host OS: Debian
Any logs | docker-compose.yml

Possible fixes

@whizzzkid whizzzkid added the bug Something isn't working label Sep 4, 2023
@Lebowski89
Copy link

For me, this occurred when I had traefik-cloudflare-companion and cloudflareddns in the same stack with all environment values in an .env file. What happened was that both of these containers have LOG_LEVEL as a variable, and I had included it as a variable in the .env file for cloudfladdns. So when the stack was brought up, companion was fed cloudflaredddns's LOG_LEVEL variable from the .env file (with a value of '3' - which is not a valid value for companion's log level - it either has to be Info, Verbose, or Debug).

Fix: Make a variable specifically for companion's LOG_LEVEL and point to it under environment.

I named mine CF_COMP_LOG_LEVEL. Gave it a value of INFO (CF_COMP_LOG_LEVEL=INFO) in the .env file. Then under environment in the compose details, I pointed to it by: LOG_LEVEL: ${CF_COMP_LOG_LEVEL}

This fixed it for me. Not that it was a bug with companion to begin with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants