Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
ng-env-logger
Advanced tools
ng-env-logger
— Angular Logging Service PackageHow many times have you left a rogue console.log
in your production code? That's the worst, right? This package will help keep that from occurring.
This package logs to the console by giving you multiple levels to write:
When the service is initialized, you provide a level for it to write. So, for example, if you provide the WARN
level (number 2), this.logService.info()
, .debug()
, and .log()
calls are ignored; only the .warn()
and .error()
functions continue to work. This will allow you to log certain messages or objects in development without worrying about removing them for your production version of the app. Whichever level you choose, the service logs that number and lower to the console.
To use the service, add the following to your AppModule
's imports array:
NgLogModule.forRoot({ level: LogLevels.WARN }),
To update the logging level, call the updateLogLevel
function on the service and pass it a one of the above levels. The provided number does have to be between 1 and 5, which are the values that the enum LogLevels provides.
FAQs
Angular service to facilitate logging based on environment.
The npm package ng-env-logger receives a total of 1 weekly downloads. As such, ng-env-logger popularity was classified as not popular.
We found that ng-env-logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.