Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Console sink throws error on initialization when used in VSCode PS integrated console preview #3

@gitbute

Description

@gitbute

Hi there

First up, cool module you have here!
I ran into following error upon installing v 2.0.0 from powershellgallery,
and trying to use it in VSCodes Powershell integrated console:

(PowerShell 5.1, Server 2016,
=====> PowerShell Preview Integrated Console v2020.6.1 <=====)

New-Logger |
    Add-SinkFile -Path 'C:\Data\my_awesome.log' |
    Add-SinkConsole |
    Start-Logger
Cannot find an overload for "Console" and the argument count: "7".
At C:\Program Files\WindowsPowerShell\Modules\PoshLog\2.0.0\functions\sinks\Add-SinkConsole.ps1:50 char:3
+         $LoggerConfig = [Serilog.ConsoleLoggerConfigurationExtensions ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest

It works in the normal console tho

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions