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.
rfx-logger
Advanced tools
Upgrade for browser console messages
Install the npm package:
npm install rfx-logger
.config
is optionalimport { RfxLoggerModule, RfxLoggerInterceptor } from 'rfx-logger';
import { HTTP_INTERCEPTORS } from '@angular/common/http';
@NgModule({
imports: [
RfxLoggerModule.config({
[ ... ]
})
],
providers: [
{
provide: HTTP_INTERCEPTORS,
useClass: RfxLoggerInterceptor,
multi: true
}
],
})
disableLogger
: boolean(default value: false
)
If true, completely disable all types of messages.
disableVerbose
: boolean(default value: false
)
If true, logger doesn't print any debug data, just a one line message.
disableHttpCodes
: boolean(default value: false
)
If true, logger doesn't show http code when http interceptor is used.
disableHttpCallDuration
: boolean(default value: false
)
If true, http calls duration are hidden
disableTime
: boolean(default value: false
)
If true, disable time inside console log.
enabledLogs
: (LogTypeEnum | string)[](default value: ['success', 'warning', 'error', 'trace']
)
Enable only selected types of log.
All logs are enabled by default.
colorsConfig
: LogStyleModel[]Customize every message tag, text, time and http response time
This is the default style:
colorsConfig: [
{
logType: 'success',
tagStyle: 'color: #000000; font-weight: bold; background-color: #8BC34A; padding: 1px 5px; margin-left: 2px;',
textStyle: 'color: #8BC34A; font-weight: bold; padding: 1px 0;',
timeStyle: 'color: #9E9E9E; font-weight: bold; padding: 1px 0;',
responseTimeStyle: 'color: #9E9E9E; font-weight: normal; padding: 1px 0;'
},
{
logType: 'warning',
tagStyle: 'color: #000000; font-weight: bold; background-color: #FFC107; padding: 1px 5px; margin-left: 2px;',
textStyle: 'color: #FFC107; font-weight: bold; padding: 1px 0;',
timeStyle: 'color: #9E9E9E; font-weight: bold; padding: 1px 0;',
responseTimeStyle: 'color: #9E9E9E; font-weight: normal; padding: 1px 0;'
},
{
logType: 'error',
tagStyle: 'color: #FFFFFF; font-weight: bold; background-color: #F44336; padding: 1px 5px; margin-left: 2px;',
textStyle: 'color: #F44336; font-weight: bold; padding: 1px 0;',
timeStyle: 'color: #9E9E9E; font-weight: bold; padding: 1px 0;',
responseTimeStyle: 'color: #9E9E9E; font-weight: normal; padding: 1px 0;'
},
{
logType: 'trace',
tagStyle: 'color: #FFFFFF; font-weight: bold; background-color: #757575; padding: 1px 5px; margin-left: 2px;',
textStyle: 'color: #BDBDBD; font-weight: bold; padding: 1px 0;',
timeStyle: 'color: #9E9E9E; font-weight: bold; padding: 1px 0;',
responseTimeStyle: 'color: #9E9E9E; font-weight: normal; padding: 1px 0;'
}
]
import { RfxLoggerService } from 'rfx-logger';
[...]
constructor(rfxLoggerService: RfxLoggerService) { }
[...]
this.rfxLoggerService.success(message, data); // success - green message
this.rfxLoggerService.warning(message, data); // warning - yellow message
this.rfxLoggerService.error(message, data); // error - red message
this.rfxLoggerService.trace(message, data); // trace - gray message
https://demo.redfoxxo.dev/rfx-logger
This project is licensed under the MIT License
FAQs
RfxLogger - upgrade your browser console messages
The npm package rfx-logger receives a total of 3 weekly downloads. As such, rfx-logger popularity was classified as not popular.
We found that rfx-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.