New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

cordova-logger

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-logger

Cordova logger for android

latest
Source
npmnpm
Version
0.0.6
Version published
Weekly downloads
8
-11.11%
Maintainers
1
Weekly downloads
 
Created
Source

Cordova-logger

Cordova logger system for android

First

Before cordova-logger, you should install cordova-plugin-file and cordova-plugin-android-permissions first.
You should install cordova-logger in Front-End project folder.

Usage

import Logger from "cordova-logger"
const logger = new Logger({  
	folder: "cordova",
	column: "log",
	filename: "file.log"
})  
logger.info("logger", "string")  // [2020-2-2 22:13:54.551]  [INFO]  logger [ext] string  

logger.checkFileWritePriority()  // return true or false  
logger.requestFileWritePriority('folder', 'column', 'file')  // request app write permission  
logger.checkExternalFileExistOrNot('filename')  // return true or false  
console.log("logger", logger)

Functions

  • Only logger.debug doesn't log to file, all of them can be print in console.
  • Only identify 999 levels in input value which contains object or array.
  • Data type includes Number, String, Undefined, Null, Boolean, Object, Array, Function, Error, Set, Map and Symbol can be support stringify. If something can't be stringify, it will be print data type, such as DOM element, it will print '[object HTMLDivElement]'
  • Although we support print Function, Set, Map and Symbol directly, we still don't recommend to print it without any transfer, and it will give a warn to remind you if you set dataTypeWarn to be true.
  • Support new multiple cordova-logger instance to log different files.
  • logger.checkFileWritePriority could check app have file write permission or not
  • logger.requestFileWritePriority request app write permission
  • logger.checkExternalFileExistOrNot check file exist or not
  • All of logger method support Promise chain call

License

MIT

Keywords

cordova

FAQs

Package last updated on 10 Aug 2020

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