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

Implement Easy Logging using a config file #747

Open
wants to merge 93 commits into
base: master
Choose a base branch
from

Conversation

sfc-gh-ext-simba-nl
Copy link
Collaborator

@sfc-gh-ext-simba-nl sfc-gh-ext-simba-nl commented Oct 2, 2024

For SNOW-981602: Implement Easy Logging using a config file

Add several new global attributes:
SF_GLOBAL_CLIENT_CONFIG_FILE: To set the client config file so libsnowflakeclient knows where to look for the config file
SF_GLOBAL_LOG_LEVEL: To allow the user to get the log level since libsnowflakeclient handles log setup
SF_GLOBAL_LOG_PATH: To allow the user to get the log path

@sfc-gh-ext-simba-nl sfc-gh-ext-simba-nl marked this pull request as ready for review October 11, 2024 16:43
@sfc-gh-ext-simba-nl sfc-gh-ext-simba-nl requested a review from a team as a code owner October 11, 2024 16:43
lib/client.c Outdated Show resolved Hide resolved
lib/client.c Outdated Show resolved Hide resolved
lib/client.c Outdated Show resolved Hide resolved
cpp/lib/ClientConfigParser.cpp Outdated Show resolved Hide resolved
cpp/lib/ClientConfigParser.cpp Outdated Show resolved Hide resolved
cpp/lib/ClientConfigParser.cpp Outdated Show resolved Hide resolved
cpp/lib/ClientConfigParser.cpp Outdated Show resolved Hide resolved
cpp/lib/ClientConfigParser.cpp Outdated Show resolved Hide resolved
cpp/lib/ClientConfigParser.cpp Outdated Show resolved Hide resolved
cpp/lib/ClientConfigParser.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@sfc-gh-jszczerbinski sfc-gh-jszczerbinski left a comment

Choose a reason for hiding this comment

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

In general looks good to me. We need to log and return false if contents of of the config are malformed;

cpp/lib/ClientConfigParser.cpp Outdated Show resolved Hide resolved
cpp/lib/ClientConfigParser.cpp Outdated Show resolved Hide resolved
tests/test_unit_logger.c Show resolved Hide resolved
Copy link
Collaborator

@sfc-gh-jszczerbinski sfc-gh-jszczerbinski left a comment

Choose a reason for hiding this comment

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

In general looks good to me.

cpp/lib/ClientConfigParser.cpp Show resolved Hide resolved
cpp/lib/ClientConfigParser.cpp Outdated Show resolved Hide resolved
cpp/lib/ClientConfigParser.cpp Outdated Show resolved Hide resolved
tests/test_unit_logger.c Outdated Show resolved Hide resolved
cpp/lib/ClientConfigParser.cpp Outdated Show resolved Hide resolved
cpp/lib/ClientConfigParser.cpp Outdated Show resolved Hide resolved
return clientConfigEnv;
}

// 3. Try DLL library dir
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's remove DLL (library seems to be enough) and rename functions and variables below

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants