-
Notifications
You must be signed in to change notification settings - Fork 394
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
The plugin log name and checkpoint name support the logtail mode. #1901
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
quzard
changed the title
Plugin Log Name Supports logtail mode
The plugin log name and checkpoint name support the logtail mode.
Nov 19, 2024
yyuuttaaoo
reviewed
Nov 19, 2024
yyuuttaaoo
approved these changes
Nov 19, 2024
#include "config/watcher/InstanceConfigWatcher.h" | ||
#include "config/watcher/PipelineConfigWatcher.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
开源文档。说明下如何兼容模式安装
messixukejia
approved these changes
Nov 19, 2024
yyuuttaaoo
approved these changes
Nov 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several new methods and configurations to better manage plugin-specific settings in the
AppConfig
class and related components. The changes focus on adding flexibility for log names, version tags, and checkpoint file names based on thelogtail_mode
flag.New Methods and Configurations:
core/app_config/AppConfig.cpp
: Added methodsGetPluginLogName
,GetVersionTag
, andGetGoPluginCheckpoint
to return different values based on thelogtail_mode
flag.core/app_config/AppConfig.h
: Declared the new methodsGetPluginLogName
,GetVersionTag
, andGetGoPluginCheckpoint
.Plugin Configuration Updates:
core/go_pipeline/LogtailPlugin.cpp
: Updated theLogtailPlugin
constructor to use the new methods for settingLoongcollectorPluginLogName
,LoongcollectorVersionTag
, andLoongcollectorCheckPointFile
in the plugin configuration.pkg/config/global_config.go
: Added new fields forLoongcollectorPluginLogName
,LoongcollectorVersionTag
, andLoongcollectorCheckPointFile
in theGlobalConfig
struct and initialized them innewGlobalConfig()
. [1] [2]Log and Checkpoint Management:
pkg/logger/logger.go
: Modified log file patterns to use the new plugin log name and updated thegenerateDefaultConfig
function accordingly. [1] [2] [3]pluginmanager/checkpoint_manager.go
: Updated the checkpoint manager to use the new checkpoint file name from the global configuration if not provided via command-line flag. [1] [2]Miscellaneous:
core/pipeline/Pipeline.cpp
: Includedapp_config/AppConfig.h
and updated log error messages to use the newGetPluginLogName
method. [1] [2] [3]pluginmanager/plugin_manager.go
: Updated JSON configuration templates to use the new version tag from the global configuration. [1] [2]pkg/logger/logger_test.go
: Adjusted test cleanup and log reading functions to use the new plugin log name.