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

Suppress time stamp diff for a specific call #31

Open
nuest opened this issue Dec 19, 2017 · 0 comments
Open

Suppress time stamp diff for a specific call #31

nuest opened this issue Dec 19, 2017 · 0 comments
Labels
feature a feature request or enhancement

Comments

@nuest
Copy link

nuest commented Dec 19, 2017

Really enjoy using your package, so here's another feature request:

Allow disabling/suppressing the time diff after each line per debug statement.

For more extensive debug cases I like to print the environment variables:

"!!!DEBUG Full environment:\n`capture.output(print(base::Sys.getenv()))`"

Which gives the output (excerpt):

mypackage Full environment:
CLICOLOR_FORCE                            1 +13ms mypackage Full environment:
CLUTTER_IM_MODULE                         xim +13ms mypackage Full environment:
COMPIZ_BIN_PATH                           /usr/bin/ +13ms mypackage Full environment:
COMPIZ_CONFIG_PROFILE                     ubuntu +13ms mypackage Full environment:
DBUS_SESSION_BUS_ADDRESS                  unix:abstract=/tmp/dbus-VNMWlDe8Oz +13ms mypackage Full environment:
DEBUGME                                   inspecter +13ms mypackage Full environment:
DEFAULTS_PATH                             /usr/share/gconf/ubuntu.default.path +13ms mypackage Full environment:
DESKTOP_SESSION                           ubuntu +13ms mypackage Full environment:
DISPLAY                                   :0 +13ms mypackage Full environment:

AFAICS there is no way to print a multi-line statement from within a DEBUG statement, and this might be out of scope? Maybe there is a solution I don't see to have line breaks in the output created by debug statements...

Some ideas:

a) defining some syntax to allow multiline output: "!!!DEBUG NOBREAK message..."
b) exposing a function to users for checking if logging is enabled, so I can check before I make a potentially costly call: debugme::isEnabled(level = 1)

@gaborcsardi gaborcsardi added the feature a feature request or enhancement label Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants