New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

spfx_logger

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spfx_logger

A Node.js module that provides custom utilities like logging in sharepoint

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

spfx_logger

spfx_logger is a library which is used to log into your sharepoint through code.

Installation

Use npm to install this package

npm install spfx_logger

Usage

import LoggerHelper from 'spfx_logger';

let _logger = new LoggerHelper();

_logger.Initalize("custom_log_list");

/* Note: If list with said name doesn't exist Initilize() method will 
create a new list in SharePoint for Logs
*/




// After logger initialization you can Log anything in your sharepoint list
let obj:ILogger = {};
obj = {
ErrorMessage: "It is error message",
ErrorDetails: "These are error details",
Extype: "Error",
 PageURL: "https:\\contoso.sharepoint.com\test\Pages\Get.aspx",
  FileName: "ListService.ts",
  Method: "GetItems()",
  UserId: 1,
  JSON: '{"error":"it is exception","message":"it is error message"}',
  ProgrammeID: 1,
  StatusCode: 404
}

_logger.Log(obj);
// this method will log your error in the initialized List 

Interface

/* The interface which is used to store the Log Object is ILogger
Note: All columns are optional 
 */
interface ILogger {
  PageURL?: string;
  FileName?: string;
  Method?: string;
  UserId?: any;
  Extype?: any;
  ErrorMessage?: string;
  ErrorDetails?: string;
  JSON?: string;
  ProgrammeID?: number;
  StatusCode?: number;
}

FAQs

Package last updated on 23 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc