Skip to content

SPFx v1.16.1 - SPFx Log not writing to console in hosted workbench #8857

@necik11

Description

@necik11

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

Windows

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

  • browser version
    • Chrome 111.0.5563.146
  • SPFx version
    • 1.16.1
  • Node.js version
    • v16.14.1

Describe the bug / error

Theimport { Log } from '@microsoft/sp-core-library'in SPFx isn't writing anything to the hosted workbench console. The native DOM console.*() API methods work fine.

I was trying :
Build your first Form Customizer extension

image

But Log.info() not writing into console.log.
So then I try make webpart and import Log either way here:
image

Same result.

It is true that this problem does not limit me in any way, as I can use the classic console.log or pnp/logging. But it is quite illogical to generate this log with "form-customizer" when it doesn't print any console.log.

Steps to reproduce

  1. Follow instructions from tutorial..
  2. yo @microsoft/sharepoint
  3. change serve.config
  4. gulp serve - on local workbench

Expected behavior

Logging

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:spfxCategory: SharePoint Framework (not extensions related)status:trackedCurrently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed)type:archive-old-issueIssues which are closed as tool old for active worktype:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions