
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@relaycorp/pino-cloud
Advanced tools
This library generates Pino configuration to format log entries in such a way that they can be properly ingested by cloud logging services such as those on Google Cloud Platform (GCP).
At this point, only GCP's Cloud Logging and Error Reporting services are supported, but we'd welcome any PRs to support additional targets, such as Elastic Search or AWS CloudWatch Logs.
Releases are automatically pushed to NPM. For example, to get the latest release, run:
npm install @relaycorp/pino-cloud
This library simply returns a configuration object for Pino, which you augment before passing to Pino. For example:
import { getPinoOptions } from '@relaycorp/pino-cloud';
const LOGGER = pino({
...getPinoOptions(process.ENV.LOGGING_TARGET, {
name: 'your-app-name',
version: '1.0.2',
}),
level: 'debug',
});
If the environment variable LOGGING_TARGET is unset, an empty object is returned.
gcperror and fatal logs are augmented to include Error Reporting fields, like the name and version of your app.
Additionally, if the log contains an err field that is an instance of Error, its stack trace will be added to the field stack_trace -- Where Error Reporting expects to find it.
The API documentation can be found on docs.relaycorp.tech.
We love contributions! If you haven't contributed to a Relaycorp project before, please take a minute to read our guidelines first.
FAQs
Pino integration for cloud logging services like Google Cloud Logging
The npm package @relaycorp/pino-cloud receives a total of 2,368 weekly downloads. As such, @relaycorp/pino-cloud popularity was classified as popular.
We found that @relaycorp/pino-cloud demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.