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

Add cmake option to disable console logfile #348

Merged
merged 2 commits into from
Sep 4, 2020

Conversation

scpeters
Copy link
Member

@scpeters scpeters commented Sep 2, 2020

The sdf::Console class logs some messages to a file in ~/.sdformat/sdformat.log by default. This wraps the code in the constructor of the sdf::Console class that opens this file in an #ifndef and adds a cmake option SDFORMAT_DISABLE_CONSOLE_LOGFILE to easily disable the use of this logfile.

Initial approach to #334.

@codecov-commenter
Copy link

codecov-commenter commented Sep 2, 2020

Codecov Report

Merging #348 into sdf10 will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##            sdf10     #348   +/-   ##
=======================================
  Coverage   87.35%   87.35%           
=======================================
  Files          60       60           
  Lines        9207     9207           
=======================================
  Hits         8043     8043           
  Misses       1164     1164           
Impacted Files Coverage Δ
include/sdf/Console.hh 100.00% <ø> (ø)
src/Console.cc 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d506bf3...f058a0a. Read the comment docs.

Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me. I think this could be documented somewhere, maybe Console.hh.

Copy link
Collaborator

@EricCousineau-TRI EricCousineau-TRI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm_strong: w.r.t. discussion in #334

Reviewed 3 of 3 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @azeey)

@chapulina chapulina added the 🔮 dome Ignition Dome label Sep 3, 2020
The sdf::Console class logs some messages to a file
in ~/.sdformat/sdformat.log by default.
This wraps the code in the constructor of the sdf::Console
class that opens this file in an `#ifndef` and adds
a cmake option `SDFORMAT_DISABLE_CONSOLE_LOGFILE`
to easily disable the use of this logfile.

Initial approach to gazebosim#334.

Signed-off-by: Steve Peters <[email protected]>
@scpeters scpeters force-pushed the disable_console_logfile branch from a0c48aa to f058a0a Compare September 3, 2020 19:41
@scpeters
Copy link
Member Author

scpeters commented Sep 3, 2020

Looks reasonable to me. I think this could be documented somewhere, maybe Console.hh.

I've added some documentation in Console.hh in f058a0a

@scpeters scpeters merged commit 805a185 into gazebosim:sdf10 Sep 4, 2020
@scpeters scpeters deleted the disable_console_logfile branch September 4, 2020 21:55
azeey pushed a commit to azeey/sdformat that referenced this pull request Dec 9, 2020
The sdf::Console class logs some messages to a file
in `~/.sdformat/sdformat.log` by default.
This wraps the code in the constructor of the `sdf::Console`
class that opens this file in an `#ifndef` and adds
a cmake option `SDFORMAT_DISABLE_CONSOLE_LOGFILE`
to easily disable the use of this logfile.

Initial approach to gazebosim#334.

Signed-off-by: Steve Peters <[email protected]>
brawner pushed a commit that referenced this pull request Dec 11, 2020
The sdf::Console class logs some messages to a file
in `~/.sdformat/sdformat.log` by default.
This wraps the code in the constructor of the `sdf::Console`
class that opens this file in an `#ifndef` and adds
a cmake option `SDFORMAT_DISABLE_CONSOLE_LOGFILE`
to easily disable the use of this logfile.

Initial approach to #334.

Signed-off-by: Steve Peters <[email protected]>
brawner pushed a commit that referenced this pull request Jan 9, 2021
The sdf::Console class logs some messages to a file
in `~/.sdformat/sdformat.log` by default.
This wraps the code in the constructor of the `sdf::Console`
class that opens this file in an `#ifndef` and adds
a cmake option `SDFORMAT_DISABLE_CONSOLE_LOGFILE`
to easily disable the use of this logfile.

Initial approach to #334.

Signed-off-by: Steve Peters <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔮 dome Ignition Dome
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants