
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@megatherium/log
Advanced tools
See the whole [documentation](https://megatherium.gitlab.io/log) or the [coverage report](https://megatherium.gitlab.io/log/coverage).
See the whole documentation or the coverage report.
Install the module:
$ npm install @megatherium/log
Use the module:
import logger from '@megatherium/log';
const log = logger.init({
app: 'test',
});
// create a logger for a subfolder
const subLog = log.init(null, 'subfolder');
subLog.debug(`A debugging message.`);
subLog.verbose(`A verbose message.`);
subLog.http(`An HTTP message - usually a request or response...`);
subLog.info(`An information.`);
subLog.warn(`A warning.`);
subLog.error(`An error message.`);
Exports an instance of Logger:
(): Promise
Clears all logs from the current log directory.(message: ...any): Promise<Message>
Logs a message on the debugging channel.(message: ...any): Promise<Message>
Logs a message on the error channel.(message: ...any): Promise<Message>
Logs a message on the http channel.(message: ...any): Promise<Message>
Logs a message on the info channel.(filenameOrMeta: string | object | null, directoryName: string): Promise<Logger>
Initializes the logger.(level: string, message: ...any): Promise<Message>
Logs a message on any channel.(message: ...any): Promise<Message>
Logs a message on the verbose channel.(message: ...any): Promise<Message>
Logs a message on the warn channel.MEGATHERIUM_QUIET: boolean
If true
, messages will not be printed on the console.NODE_ENV: string
If 'production'
, messages on the debug
-channel will be ignored.The following scripts can be executed using npm run
:
build
Builds the module.build-docs
Builds the documentation.build-source
Builds the source code.build-tests
Builds test-cases from jsdoc examples.clear
Clears the module from a previous build.clear-coverage
Clears the coverage reports and caches.clear-docs
Clears the previous documentation build.clear-source
Clears the previous source build.clear-tests
Clears the generated jsdoc example test files.fix
Runs all automated fixes.fix-lint
Automatically fixes linting problems.release
Runs semantic release. Meant to be only executed by the CI, not by human users.test
Executes all tests.test-coverage
Generates coverage reports from the test results using nyc.test-deps
Executes a depcheck.test-e2e
Executes End-to-End-Tests using cucumber.test-integration
Executes integration tests using jest.test-lint
Executes linting tests using eslint.test-unit
Executes unit tests using mocha.update
Checks for dependency updates using renovate.See Contribution Guidelines for more details.
FAQs
See the whole [documentation](https://megatherium.gitlab.io/log) or the [coverage report](https://megatherium.gitlab.io/log/coverage).
We found that @megatherium/log 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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.