-
Notifications
You must be signed in to change notification settings - Fork 0
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
Introduce new package "automation" #14
Conversation
61b347b
to
a1617d2
Compare
// operations. | ||
Verbose bool | ||
|
||
// Out describe the destination writer for logs. If unset, all logging is |
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.
maybe write logs by default to stdout?
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.
Probably you mean Stderr. I did so initially. but it makes it harder to disable the logs, as you can't disable it by setting it to nil. Also, it's common in go to let logging be disabled by default in library packages.
E.g. if you have a program using structured logging (usually JSON), you would not want unstructured logs to end up among the output without you having actively enabled it.
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.
It's currently set by default in the automation template binary:
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.
Actually I meant stdout
, but now I understand that it's best practice to log to stderr
👍
The new automation package is an utility package to allow setting up automations on top of Clarify. As a first automation type, we are adding a PublishSignals automation, which allow more easily publishing signals as items through a defined set of rules.
Update example to use new automation package. This greatly reduce the code-size for the publish signals example.
Used by https://github.com/clarify/template-clarify-automation (repo is private for now, but will be made public when PR is merged).
commit 3c085ed (HEAD -> automation, origin/automation)
Author: Sindre Myren sindre@clarify.io
Date: Wed Oct 12 14:28:23 2022 +0200
commit d8bf0b6
Author: Sindre Myren sindre@clarify.io
Date: Wed Oct 5 13:01:20 2022 +0200
commit 201d6f3
Author: Sindre Myren sindre@clarify.io
Date: Wed Oct 5 11:43:09 2022 +0200
commit efd5355
Author: Sindre Myren sindre@clarify.io
Date: Sun Sep 25 22:45:04 2022 +0200