Write-Debug not showing up in App Insights/Console Logs
See original GitHub issueWe are trying to use Write-Debug and Write-Verbose for debug messages but none of the messages appear on the console or in App Insights. The host.json is configured as follows:
{
"version": "2.0",
"logging": {
"logLevel": {
"default": "Trace"
}
}
}
The following statements:
Write-Host "Log levels"
Write-Error "This is an error"
Write-Warning "This is a warning"
Write-Information "This is information"
Write-Verbose "This is verbose"
Write-Debug "This is debug"
result in the following logs on the Console and in App Insights:
2019-03-08T15:58:42.324 [Information] INFORMATION: Log levels
2019-03-08T15:58:42.717 [Error] ERROR: This is an error
Microsoft.Azure.WebJobs.Script.Rpc.RpcException : Result: ERROR: This is an error
Exception: This is an error
Stack:
2019-03-08T15:58:42.748 [Warning] WARNING: This is a warning
2019-03-08T15:58:42.748 [Information] INFORMATION: This is information
Do we need to do anything else as configuration or should this be enough to log the messages?
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Application insights for function app not showing console ...
Hello I am writing to figure out why application insights for function apps are not showing any console log statements in the function...
Read more >With PowerShell, how can I get Write-Debug output to ...
3 Answers. tl;dr: Run $DebugPreference = 'Continue' to start seeing output from Write-Debug calls. To turn on debug output for a given cmdlet ......
Read more >How To Write Debug Messages To The Console In PowerShell
In this video, Kenward will cover using the Write-Debug cmdlet, the $DebugPreference automatic variable, using debugging in PowerShell ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@toddysm can you try something for me?
Can you change your:
to
and see if this repros
Yes. This works. It sounds redundant though.