Skip to content

Log level does not support the "trace" keyword #3525

@marckhouzam

Description

@marckhouzam

Please fill out the issue checklist below and provide ALL the requested information.

  • I reviewed open and closed github issues that may be related to my problem.
  • I tried updating to the latest version of the CF CLI to see if it fixed my problem.
  • I attempted to run the command with CF_TRACE=1 to help debug the issue.
  • I am reporting a bug that others will be able to reproduce.

Describe the bug and the command you saw an issue with

While working on code changes I noticed that I wasn't able to see logs if I set the log level to trace. It turns out that the log level using the trace keyword isn't supported although it has been added to the logger 7 years ago.

What happened

Notice that a debug log is being printed when I use the debug level

$ CF_LOG_LEVEL=debug cf create-package hello
Creating and uploading bits package for app hello in org myorg / space myspace as john.doe@example.com...
DEBU[0000] convert to translatable error                 err="actionerror.ApplicationNotFoundError{GUID:\"\", Name:\"hello\"}"
App 'hello' not found.
FAILED

but that if I set the log level to trace the debug printout does not appear.

$ CF_LOG_LEVEL=trace cf create-package hello
Creating and uploading bits package for app hello in org myorg / space myspace as john.doe@example.com...
App 'hello' not found.
FAILED

however, if I set the debug level to 6, which corresponds to trace it does show:

$ CF_LOG_LEVEL=6 cf create-package hello
Creating and uploading bits package for app hello in org myorg / space myspace as john.doe@example.com...
DEBU[0000] convert to translatable error                 err="actionerror.ApplicationNotFoundError{GUID:\"\", Name:\"hello\"}"
App 'hello' not found.
FAILED

Expected behavior

I should be able to use CF_LOG_LEVEL=trace

Exact Steps To Reproduce

See above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions