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

Fallback log group and stream names #99

Closed
PettitWesley opened this issue Sep 25, 2020 · 4 comments
Closed

Fallback log group and stream names #99

PettitWesley opened this issue Sep 25, 2020 · 4 comments

Comments

@PettitWesley
Copy link
Contributor

@davidnewhall's awesome new formatting code means you can make the log stream and group names pretty much anything.

But what if something goes wrong?

As shown here, the plugin will make the names using the keys it couldn't find: #16 (comment)

This is probably ok. But the ideal user experience would be to have a fallback log stream or group names that would be used if the necessary keys are not found in the logs.

@PettitWesley
Copy link
Contributor Author

@davidnewhall Is this possible with the template code/library?

@davidnewhall
Copy link
Contributor

davidnewhall commented Sep 25, 2020

I think adding a new key, like default_log_group_name and default_log_stream_name are the best options for that. I might be thinking too narrow here? That would require adjusting the method(s) a bit so they return some sort of error when a provided variable is not found in the data map/json.

EDIT: For the log stream, we can use log_stream_prefix as a backup too. I toyed with this idea as I was making those changes originally, and I wasn't quite sure the best way to handle it. I suppose falling back to that if any of the keys are missing would be ideal.

@davidnewhall
Copy link
Contributor

This can be closed. We have fallback log and stream names now. Documented in the README as default_log_group_name and default_log_stream_name.

@PettitWesley
Copy link
Contributor Author

Thanks!

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

No branches or pull requests

2 participants