Skip to content

Conversation

ejizba
Copy link
Contributor

@ejizba ejizba commented Feb 6, 2018

Builds will fail until the appservice package is published with logstream support: microsoft/vscode-azuretools#67

Fixes #11

Edit: More fixes for log stream in the shared package here: microsoft/vscode-azuretools#68

@ejizba ejizba requested a review from a team February 6, 2018 00:26
import { FunctionAppTreeItem } from '../../tree/FunctionAppTreeItem';
import { ILogStreamTreeItem } from './ILogStreamTreeItem';

export async function stopStreamingLogs(tree: AzureTreeDataProvider, node?: IAzureNode<ILogStreamTreeItem>): Promise<void> {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this function (and corresponding context menu item) would be visible for every Function App. Is there a way to filter the node picker and context menu presence down to Apps that have a logStream present? (I see that being done with the node.treeItem.logStream conditional - I think the UX might be cleaner though)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not recommended to hide things like context-menu commands based on state. Users will get confused about why it displays sometimes and not other times. Best practice is actually to gray-out the option, but I don't think that's possible in VS Code

In any case, I'll just display a warning to the user in this case.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, greying out an option makes waay more sense. I stand corrected. :)

if (!node) {
node = <IAzureNode<ILogStreamTreeItem>>await tree.showNodePicker(FunctionAppTreeItem.contextValue);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a check to verify that the Streaming Log for the chosen node hasn't already been started. I don't see anything in the docs suggesting that createOutputChannel would perform an 'already-present' check.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this fixed in this AzureTools PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A combination of that PR and the commit I pushed to this PR here

Also check that application logging is enabled
@ejizba ejizba merged commit 04a1dab into master Feb 6, 2018
@ejizba ejizba deleted the ej/logstream branch February 6, 2018 19:47
@github-actions github-actions bot locked and limited conversation to collaborators Jan 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

View streaming traces for a function

2 participants