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

Slack Logging #10

Closed
baingar opened this issue Nov 2, 2017 · 5 comments
Closed

Slack Logging #10

baingar opened this issue Nov 2, 2017 · 5 comments

Comments

@baingar
Copy link

baingar commented Nov 2, 2017

Is Slack logging still compatible? I'm having trouble logging messages to Slack. I've verified my URI is proper as I can send a manual Invoke-WebRequest command to Slack, but not from this Logging module.

@EsOsO
Copy link
Collaborator

EsOsO commented Nov 3, 2017

I'm sorry... I don't use slack and the slack part is not maintained, feel free to contribute with a pull request.
Maybe next week I can try to look into the issue. Could you provide me some more info? Also the Invoke-WebRequest you used to successfully send a message.

@baingar
Copy link
Author

baingar commented Nov 3, 2017

I haven't had time to investigate the specific reason. I followed the readme and added logging target by populating only the webhook serverURI. I then performed a write-log and it didn't send the message to slack.

On an unrelated note, is there a capability to log to a specific target when multiple logging targets are added?

@EsOsO
Copy link
Collaborator

EsOsO commented Nov 6, 2017

Right now there's no way to log to a specific target if multiple are defined; you could try using Add-LoggingLevel and define a custom level used only in a target:

Add-LoggingLevel -Level 5 -LevelName CUSTOM
Add-LoggingTarget -Name Slack -Configuration @{ServerUri='<slack channel url>'; Level='CUSTOM'}
Write-Log -Level CUSTOM -Message 'Hello, World!'

I'll try to look into the issue of the target; I'll keep you posted.

@EsOsO
Copy link
Collaborator

EsOsO commented Nov 6, 2017

I fixed the issue. 51e17be

Let me know if you still have issues.

@EsOsO EsOsO closed this as completed Nov 6, 2017
@baingar
Copy link
Author

baingar commented Nov 6, 2017

Awesome! Thank you. I'll have to give it another try and let you know how it works. Cheers!

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