Skip to content

Logger is no longer a singleton #493

Closed

Description

@dzenanz

Since the move to IGSIO for some functionality, vtkPlusLogger inherits from vtkIGSIOLogger but creates a separate instance. So my application which used to set log level to 5 now does not get all the messages, because Plus internals now use vtkIGSIOLogger which is a separate instance from vtkPlusLogger.

Expected behavior: there is a single logger instance, and vtkPlusLogger is an empty descendant, or even better just a rename using vtkPlusLogger = vtkIGSIOLogger;

Activity

  1. dzenanz commented on Feb 8, 2019

    @dzenanz
    ContributorAuthor

    It looks like I have mistaken about two instances - there seems to be a single instance. However, SetLogLevel(5) is not respected. The errors from vtkPlusTimestampedCircularBuffer and vtkPlusBuffer are not logged.

  2. dzenanz commented on Feb 8, 2019

    @dzenanz
    ContributorAuthor

    Setting the logging level has no effect if done before this statement:

    vtkPlusConfig::GetInstance()->SetDeviceSetConfigurationData(configRootElement);

    Either vtkIGSIOLogger::Instance()->SetLogLevel(5); or vtkPlusLogger::Instance()->SetLogLevel(5); work after that statement.

    Is this expected? Is this documented somewhere?

  3. Sunderlandkyl commented on Feb 11, 2019

    @Sunderlandkyl
    Contributor

    I don't think that this is expected behavior, seems like a bug.
    I'll take a look at it.

  4. dzenanz commented on Feb 12, 2019

    @dzenanz
    ContributorAuthor

    That fixed it. Thanks!

  5. added a commit that references this issue on Feb 15, 2019
    5fa6674
  6. added a commit that references this issue on Jul 22, 2019
    c8168e8
  7. added a commit that references this issue on Mar 25, 2025
    25f0720
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions