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

Don't add unnecessary noise to the OmniSharp log #1155

Merged
merged 1 commit into from
Jan 30, 2017

Conversation

DustinCampbell
Copy link
Member

This changes display of the OmniSharp log to be easier to read. It's longer, but much improved (IMO).

So, this...

Starting OmniSharp server at 1/27/2017, 1:00:46 PM
    Target: c:\Projects\test

OmniSharp server started
    Path: C:/Projects/omnisharp-roslyn/src/OmniSharp/bin/Debug/net46/win7-x64/OmniSharp.exe
    PID: 9604

OmniSharp: -s c:\Projects\test --hostPID 11056 --stdio DotNet:enablePackageRestore=false --encoding utf-8 formattingOptions:useTabs=false formattingOptions:tabSize=4 formattingOptions:indentationSize=4
[info]: OmniSharp.Startup
        Omnisharp server running using Stdio at location 'c:\Projects\test' on host 11056.
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Initializing in c:\Projects\test
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Auto package restore: False
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Update workspace context
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Resolving projects references
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Searching for solution OmniSharp.sln to locate MSBuild tools...
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        MSBUILD_EXE_PATH environment variable set to C:\Projects\omnisharp-roslyn\.msbuild-net46\MSBuild.exe
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        MSBuildExtensionsPath environment variable set to C:\Projects\omnisharp-roslyn\.msbuild-net46
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        MSBuildSDKsPath environment variable set to C:\Projects\omnisharp-roslyn\.msbuild-net46\Sdks
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        No solution files found in 'c:\Projects\test'
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Add project: c:\Projects\test\test.csproj
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Update project: test
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in 'c:\Projects\test'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.Startup
        Configuration finished.

Rather that this...

Starting OmniSharp server at 1/27/2017, 1:03:25 PM
    Target: c:\Projects\test

OmniSharp server started
    Path: C:/Projects/omnisharp-roslyn/src/OmniSharp/bin/Debug/net46/win7-x64/OmniSharp.exe
    PID: 18864

OmniSharp: -s c:\Projects\test --hostPID 18548 --stdio DotNet:enablePackageRestore=false --encoding utf-8 formattingOptions:useTabs=false formattingOptions:tabSize=4 formattingOptions:indentationSize=4
[INFORMATION:OmniSharp.Startup] Omnisharp server running using Stdio at location 'c:\Projects\test' on host 18548.
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Initializing in c:\Projects\test
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Auto package restore: False
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Update workspace context
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Resolving projects references
[INFORMATION:OmniSharp.MSBuild.MSBuildProjectSystem] Searching for solution OmniSharp.sln to locate MSBuild tools...
[INFORMATION:OmniSharp.MSBuild.MSBuildProjectSystem] MSBUILD_EXE_PATH environment variable set to C:\Projects\omnisharp-roslyn\.msbuild-net46\MSBuild.exe
[INFORMATION:OmniSharp.MSBuild.MSBuildProjectSystem] MSBuildExtensionsPath environment variable set to C:\Projects\omnisharp-roslyn\.msbuild-net46
[INFORMATION:OmniSharp.MSBuild.MSBuildProjectSystem] MSBuildSDKsPath environment variable set to C:\Projects\omnisharp-roslyn\.msbuild-net46\Sdks
[INFORMATION:OmniSharp.MSBuild.MSBuildProjectSystem] No solution files found in 'c:\Projects\test'
[INFORMATION:OmniSharp.MSBuild.MSBuildProjectSystem] Add project: c:\Projects\test\test.csproj
[INFORMATION:OmniSharp.MSBuild.MSBuildProjectSystem] Update project: test
[INFORMATION:OmniSharp.Script.ScriptProjectSystem] Detecting CSX files in 'c:\Projects\test'.
[INFORMATION:OmniSharp.Script.ScriptProjectSystem] Could not find any CSX files
[INFORMATION:OmniSharp.Startup] Configuration finished.

@DustinCampbell
Copy link
Member Author

@filipw, do you want to take a look?

@DustinCampbell DustinCampbell added this to the 1.7 milestone Jan 30, 2017

private _isFilterableOutput(logLevel: string, name: string, message: string) {
// filter messages like: /codecheck: 200 339ms
const timing200Pattern = /^\/[\/\w]+: 200 \d+ms/;
Copy link
Contributor

Choose a reason for hiding this comment

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

this definitely deserve a downgrade in logging level on the server side 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I completely agree. It already existed in the extension though (before I was on the project).

@filipw
Copy link
Contributor

filipw commented Jan 30, 2017

nice. Did you pull in the latest omnisharp server already? if so, we can extend the options to pass in the log level at server start up (#993) - I was planning to PR it, but wasn't sure if the extension already has the latest server code

@DustinCampbell
Copy link
Member Author

I haven't pulled it in yet. I don't think we've built a new release of OmniSharp yet. I was hoping to kick off a new release build this morning but it doesn't seem like AppVeyor is going.

@DustinCampbell DustinCampbell merged commit bae80cd into dotnet:master Jan 30, 2017
@DustinCampbell DustinCampbell deleted the clean-up-omnisharp-log branch January 31, 2017 20:44
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

Successfully merging this pull request may close these issues.

3 participants