Skip to content

feat(logger): allow changing tag#81

Merged
finger563 merged 1 commit intomainfrom
feature/logger-set-tag
Jun 29, 2023
Merged

feat(logger): allow changing tag#81
finger563 merged 1 commit intomainfrom
feature/logger-set-tag

Conversation

@finger563
Copy link
Contributor

@finger563 finger563 commented Jun 29, 2023

Description

  • added set_tag(std::string_view) to logger API
  • Added mutex to protect tag_ member of logger class
  • Updated and rebuilt docs

Motivation and Context

For subclasses whose parent class contains a logger, they had no way to change the logger's tag to indicate the new class name. This API update allows such subclasses to change the tag if they so choose. Of course, logger tags can be changed for other reasons as well, this PR allows those use cases.

How has this been tested?

Building and running the logger example.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

CleanShot 2023-06-29 at 14 11 46

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

* added set_tag(std::string_view) to logger API
* Added mutex to protect tag_ member of logger class
* Updated and rebuilt docs
@finger563 finger563 added enhancement New feature or request logger labels Jun 29, 2023
@finger563 finger563 merged commit f026a5d into main Jun 29, 2023
@finger563 finger563 deleted the feature/logger-set-tag branch June 29, 2023 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request logger

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant