Closed ManiMatter closed 2 weeks ago
@ManiMatter: Thanks for opening an issue, it is currently awaiting triage.
In the meantime, you can:
Is this a bug, or am I misunderstanding the reference documents?
Not really, more just an undocumented default behaviour. By default we provide this config.yaml which already defaults the log level to INFO. The description of the environment variables is to FORCE
the container to that level and since INFO is the default not providing the env var does nothing.
Many thanks, @LaurenceJJones
Is there a way I can change the log level for my docker container to "warn"? I do not care about all these info logs; but because there are so many info logs, I will not see when eventually there is a "warn" or "error" log.
Many thanks, @LaurenceJJones
Is there a way I can change the log level for my docker container to "warn"? I do not care about all these info logs; but because there are so many info logs, I will not see when eventually there is a "warn" or "error" log.
Since you are persisting the /etc/crowdsec/
directory you can edit the config.yaml
directly within that folder and make it that level. Bare in mind that we log decisions and general information on INFO so you may miss some information.
You can always use grep to filter the output
docker logs <container> 2>&1 | grep -E "level=(error|fatal|warn)"
Thank you. I was hoping I could set it via a docker variable, as I do with most other containers. Guess there is no way to achieve that?
Thank you. I was hoping I could set it via a docker variable, as I do with most other containers. Guess there is no way to achieve that?
Not currently, we only have the ones documented, however, it should be easy to expand and add warn
and error
levels
Many thanks, @LaurenceJJones
What happened?
I am running crowdsec with the following docker-compose. In the logs, I see plenty of entries of verbosity level "info".
According to the reference doc, info logs should only be surfaced if
LEVEL_INFO
is true. Additionally, ifLEVEL_INFO
is not set, it should default to false.In my case, I have not set
LEVEL_INFO
, for which it should be false, and thus no info logs should be displayed. Is this a bug, or am I misunderstanding the reference documents?docker-compose:
Example of observed info-logs:
What did you expect to happen?
To not see info logs when LEVEL_INFO is not set.
How can we reproduce it (as minimally and precisely as possible)?
Check logs of crowdsec when LEVEL_INFO is not set
Anything else we need to know?
No response
Crowdsec version
version: v1.6.2-16bfab86 Codename: alphaga BuildDate: 2024-06-05_14:25:55 GoVersion: 1.22.3 Platform: docker libre2: C++ User-Agent: crowdsec/v1.6.2-16bfab86-docker Constraint_parser: >= 1.0, <= 3.0 Constraint_scenario: >= 1.0, <= 3.0 Constraint_api: v1 Constraint_acquis: >= 1.0, < 2.0