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

Save verbose output to a log file #267

Open
chapulina opened this issue Sep 29, 2021 · 0 comments
Open

Save verbose output to a log file #267

chapulina opened this issue Sep 29, 2021 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@chapulina
Copy link
Contributor

The IGN_VERBOSE environment variable provides a way of getting useful information to debug a transport setup. It would be great if it would also save the logs to a file, for easier searching.

Desired behavior

Always log verbose output to a timestamped file under ~/.ignition/transport/log. It would be nice if the filename contained information about the process that generated the logs.

Alternatives considered

We could only save the log files when IGN_VERBOSE is set, for performance. But this means users have to remember to set the variable.

Implementation suggestion

It may be good for performance if we dumped to the file at once at the end of a run, instead of appending lines to the file as execution happens.

Another thing to consider is using ignition::common::Console, so the logs from transport end up together with other libraries' logs.

Additional context

Ignition Gazebo dumps logs to ~/.ignition/gazebo/log for every run, even if the user is not running in verbose mode. So choosing the verbose mode only affects what ends up in the console. All ignition::common::Console from upstream libraries end up in these logs.

Ignition Rendering dumps logs to ~/.ignition/rendering/<engine>.log, and the log is updated for every run. This saves space in the computer, but makes it inconvenient to compare several runs.

@chapulina chapulina added enhancement New feature or request help wanted Extra attention is needed labels Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant