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

#82 - configurable scout log level #83

Merged
merged 7 commits into from
Oct 8, 2019
Merged

Conversation

asgrim
Copy link
Collaborator

@asgrim asgrim commented Oct 2, 2019

Fixes #82

@asgrim asgrim added the enhancement New feature or request label Oct 2, 2019
@asgrim asgrim requested a review from cschneid October 2, 2019 10:21
@@ -108,7 +108,7 @@ private function run() : bool
{
$this->logger->debug('Core Agent Launch in Progress');
try {
$logLevel = $this->config->get('log_level');
$logLevel = $this->config->get('agent_log_level');
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note: this is likely a BC break, so I'm happy to take suggestions on "naming" stuff here...

Copy link
Contributor

Choose a reason for hiding this comment

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

The python names, and names here are mostly core_agent_KEY as the pattern for config. So why not core_agent_log_level for this.

https://docs.scoutapm.com/#core_agent_dir-1

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK: I've extracted all config key strings I could find and put them into a single class to keep naming consistent. I then renamed the core agent-related keys in dbbe20d as follows:

  • log_level => core_agent_log_level
  • log_file => core_agent_log_file
  • config_file => core_agent_config_file
  • socket_path => core_agent_socket_path
  • download_url => core_agent_download_url

These are all BC breaks of course, but if you're happy with these renames, it does add consistency. I've noted these changes in the CHANGELOG.md.

src/Logger/FilteredLogLevelDecorator.php Outdated Show resolved Hide resolved
@@ -108,7 +108,7 @@ private function run() : bool
{
$this->logger->debug('Core Agent Launch in Progress');
try {
$logLevel = $this->config->get('log_level');
$logLevel = $this->config->get('agent_log_level');
Copy link
Contributor

Choose a reason for hiding this comment

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

The python names, and names here are mostly core_agent_KEY as the pattern for config. So why not core_agent_log_level for this.

https://docs.scoutapm.com/#core_agent_dir-1

@asgrim asgrim force-pushed the 82-configurable-scout-log-level branch from 2d89edb to dbbe20d Compare October 3, 2019 09:28
@asgrim asgrim requested a review from cschneid October 7, 2019 08:04
@asgrim asgrim merged commit 6f48abd into master Oct 8, 2019
@asgrim asgrim deleted the 82-configurable-scout-log-level branch October 8, 2019 07:23
@asgrim asgrim added this to the 0.3.0 milestone Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Configurable LogLevel specific to Scout Agent
2 participants