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

fix:fix globalWatcher is nil,when source is enable #648

Merged
merged 1 commit into from Nov 22, 2023

Conversation

LeiZhang-Hunter
Copy link
Contributor

@LeiZhang-Hunter LeiZhang-Hunter commented Nov 21, 2023

Proposed Changes:

  • When there is only one source and it is enabled, globalWatcher is nil. If the helper interface is requested later, core will occur.

Which issue(s) this PR fixes:

pipelines:
  - name: local
    sources:
      - type: file
        enabled: false
        name: demo
        paths:
          - /home/zhanglei/*.log
        fields:
          "@topic": "loggie"
    interceptors:
      - type: normalize
        name: global
        processors:
          - addMeta: ~
          - add:
              fields:
                "metadata.module": "loggie"
                "metadata.type": ""
                "metadata.version": 1.444
          - rename:
              convert:
                - from: "meta.systemState.collectTime"
                  to: "colleciton.@collectiontime"
                - from: "body"
                  to: "collection.@message"
                - from: "meta.systemState.filename"
                  to: "collection.@path"
                - from: "meta.systemState.lineNumber"
                  to: "collection.@rownumber"
          - drop:
              targets: ["meta"]

    sink:
      #      type: dev
      #      printEvents: true
      #      codec:
      #        pretty: true
      type: router
      hosts:
        - "192.168.110.117:7070"
      max_client: 1

Fixes #

if globalWatcher == nil {
		return watcherMetrics
}

Additional documentation:


@LeiZhang-Hunter
Copy link
Contributor Author

fix globalWatcher is nil

@ethfoo ethfoo merged commit b584302 into loggie-io:main Nov 22, 2023
2 checks passed
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.

None yet

2 participants