Skip to content

Conversation

@tengu-alt
Copy link
Contributor

@tengu-alt tengu-alt commented Jun 6, 2024

This PR removes the global instance of the logger. For now, if the logger in the cluster config is not set, the new approach will set a new instance of the default logger for each session.
Issue: #1766

@joao-r-reis joao-r-reis changed the title global logger was removed CASSGO-24 global logger was removed Oct 30, 2024
@joao-r-reis
Copy link
Contributor

Please format your commit message following the rules stated in CONTRIBUTING.md and add this JIRA to the CHANGELOG.md in the Changed section of Unreleased, thanks!

We need another committer +1 to merge this.

@tengu-alt tengu-alt force-pushed the logger-refactor branch 4 times, most recently from ccd50b0 to 9aa5d34 Compare November 13, 2024 10:13
@tengu-alt
Copy link
Contributor Author

Please format your commit message following the rules stated in CONTRIBUTING.md and add this JIRA to the CHANGELOG.md in the Changed section of Unreleased, thanks!

We need another committer +1 to merge this.

Done.

@tengu-alt tengu-alt force-pushed the logger-refactor branch 2 times, most recently from 2a6781c to c8cfbeb Compare November 13, 2024 12:49
@martin-sucha
Copy link
Contributor

Just a nit pick, the commit title is in past tense now (Global logger was removed), as mentioned in CONTRIBUTING.md, it should be in the present tense instead (Remove global logger).

@tengu-alt
Copy link
Contributor Author

Just a nit pick, the commit title is in past tense now (Global logger was removed), as mentioned in CONTRIBUTING.md, it should be in the present tense instead (Remove global logger).

Good catch, I'll change it.

@tengu-alt tengu-alt changed the title CASSGO-24 global logger was removed CASSGO-24 emove Nov 18, 2024
@tengu-alt tengu-alt changed the title CASSGO-24 emove CASSGO-24 Remove global logger Nov 18, 2024
@tengu-alt tengu-alt force-pushed the logger-refactor branch 4 times, most recently from 6f71a2b to 493c135 Compare November 20, 2024 11:34
@tengu-alt
Copy link
Contributor Author

@joao-r-reis Should it be merged?

@joao-r-reis
Copy link
Contributor

Please update the commit message to include Jackson as a reviewer and then I'll merge it 👍

By default, if the logger in the cluster config is not set,
the NewSession() method sets a default logger instance
which is a deprecated global variable.

patch by Oleksandr Luzhniy; reviewed by João Reis, Stanislav Bychkov, Jackson Fleming, for CASSGO-24
@tengu-alt
Copy link
Contributor Author

Please update the commit message to include Jackson as a reviewer and then I'll merge it 👍

Done

@joao-r-reis joao-r-reis merged commit ba7d563 into apache:trunk Jan 23, 2025
16 checks passed

// Logger for this ClusterConfig.
// If not specified, defaults to the global gocql.Logger.
// If not specified, defaults to the gocql.defaultLogger.
Copy link
Contributor

Choose a reason for hiding this comment

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

defaultLogger is private so you'd have to look at the code to know what this does. Instead this should be:

// If not specified, defaults to using the log package.

Copy link
Contributor Author

@tengu-alt tengu-alt Jan 28, 2025

Choose a reason for hiding this comment

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

Understood, it makes sense. I will lay a hand on that on the next PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants