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

logging: add LOG_RAW macro #23019

Open
koffes opened this issue Feb 21, 2020 · 6 comments
Open

logging: add LOG_RAW macro #23019

koffes opened this issue Feb 21, 2020 · 6 comments
Assignees
Labels
area: Logging Enhancement Changes/Updates/Additions to existing features

Comments

@koffes
Copy link
Collaborator

koffes commented Feb 21, 2020

The logging system provides many useful features.

In our system we get prints on the format: <wrn_lvl>
This is fine most of the time, but sometimes we want to use ANSI escape characters for cursor positioning. With the current system we cannot e.g. save the cursor position in a desirable manner because <wrn_lvl> has been printed before the command reaches the terminal.

Suggestion: Add a LOG_RAW macro which uses all the features of the logging system, but omits the timestamp, level and module.

@nordic-krch

@koffes koffes added the Feature Request A request for a new feature label Feb 21, 2020
@carlescufi
Copy link
Member

This could be useful for the Bluetooth monitor as well. CC @jhedberg

@jhedberg
Copy link
Member

In the case of the monitor protocol (btsnoop) it's all binary, whereas I think the suggestion here is for LOG_RAW to take a string.

@koffes
Copy link
Collaborator Author

koffes commented Feb 24, 2020

@jhedberg that is correct. May the existing feature LOG_HEXDUMP be close to what you need?
Perhaps LOG_BARE_RAW and LOG_BARE_STR be more suitable?

@nordic-krch
Copy link
Contributor

what level would that use. Do we implicitly assume something (e.g. info) or create LOG_RAW_INF?

@koffes
Copy link
Collaborator Author

koffes commented Feb 24, 2020

Edit: I think your idea with explicit level is good. If not, I would set it as ERR.

@carlescufi carlescufi added area: Logging Enhancement Changes/Updates/Additions to existing features and removed Feature Request A request for a new feature labels Apr 7, 2020
@nashif nashif added this to Logging Nov 20, 2022
@nashif nashif moved this to 🆕 New in Logging Nov 20, 2022
@zephyrbot
Copy link
Collaborator

Hi @nordic-krch,

This issue, marked as an Enhancement, was opened a while ago and did not get any traction. Please confirm the issue is correctly assigned and re-assign it otherwise.

Please take a moment to review if the issue is still relevant to the project. If it is, please provide feedback and direction on how to move forward. If it is not, has already been addressed, is a duplicate, or is no longer relevant, please close it with a short comment explaining the reason.

@koffes you are also encouraged to help moving this issue forward by providing additional information and confirming this request/issue is still relevant to you.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Logging Enhancement Changes/Updates/Additions to existing features
Projects
Status: 🆕 New
Development

No branches or pull requests

5 participants