ovhemert / pino-papertrail Goto Github PK
View Code? Open in Web Editor NEW🌲 Load pino logs into Papertrail
License: MIT License
🌲 Load pino logs into Papertrail
License: MIT License
I'm wondering if this library is meant to be used inside of a Node project as well. Is there a chance of an exported API to use in my code, like most others transports?
import pinoms from "pino-multi-stream";
import pinoPapertrail from "pino-papertrail";
const papertrailStream = pinoPapertrail.createWriteStream({
appname: "pino",
host: "logsXXX.papertrailapp.com",
port: "XXXXX",
});
const prettyStream = pinoms.prettyStream({
dest: papertrailStream,
});
const lg = pinoms({
streams: [{ stream: prettyStream }, { stream: process.stdout }],
});
export { lg };
I need help. I assume I am doing sth. wrong. I set up a papertrail account, created a log destination and added the host and port to my file, see the code. But there is no logging on papertrail. What am I missing? Thanks for pointing me in the right direction folks.
🚨 You need to enable Continuous Integration on all branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial
branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.
Tests are failing on Appveyor because they don't like me to spin up a real UDP server in the tests.
Need to stub an UDP server to allow tests to pass. And then get Travis to test on all OS's.
The papertrail UDP transmission is not encrypted. The alternative is to use its TCP transmission with TLS.
Would you add support of TCP (with TLS) and use it as default?
5.6.0
to 5.6.1
.This version is covered by your current version range and after updating it in your project the build failed.
pino is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
🚨 You need to enable Continuous Integration on all branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial
branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.
5.10.5
to 5.10.6
.This version is covered by your current version range and after updating it in your project the build failed.
pino is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 4 commits.
ef50bb3
5.10.6
5493ff3
Merge pull request #577 from nwoltman/patch-1
1332450
Fix typo in docs
aa83488
Fixing minor formating typo (#576)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
5.5.0
to 5.6.0
.This version is covered by your current version range and after updating it in your project the build failed.
pino is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 3 commits.
279a896
Bumped v5.6.0
6aafe70
removed debug as a devDependency
e870ff3
Allow custom levels to override default and allow to remove default levels (#515)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Pino v7 coming with new transports - https://getpino.io/#/docs/transports?id=v7-transports
Would be awesome to have pino v7 transport out of the box.
I've tried to connect pino-papertrail
as shown in pino v7 docs example and it seems to be working:
transport
import papertrail from 'pino-papertrail'
export default function paperTrailTransport(options = {}) {
return papertrail.createWriteStream({ ...options, appname: 'api-server' })
}
logger
import pino from 'pino'
const transport = pino.transport({
target: './papertrail-transport.js',
options: { host: 'xxx', port: 111 }
})
const logger = pino(transport)
export default logger
If I undestand correctly, a default export with such transport is everything what needs to be done.
p.s. I'm just trying papertrail
and not sure everything's correctly set, but I can see correct logs in papertrail panel 😉
🚨 You need to enable Continuous Integration on all branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial
branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.
12.0.1
to 12.0.2
.This version is covered by your current version range and after updating it in your project the build failed.
tap is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
14.1.0
to 14.2.0
.This version is covered by your current version range and after updating it in your project the build failed.
standard is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 24 commits.
027e7e9
update authors
379a28b
14.2.0
a45c511
Update CHANGELOG.md
d1ef5f8
Update eslint to the latest version 🚀 (#1395)
f4f9bde
optimize grab.png
a4216aa
Add Grab to users list (#1396)
f71b65b
chore: .npmrc with package-lock=false (#1407)
5b2b360
chore: .npmrc with package-lock=false
80c5605
Format AUTHORS.md with hallmark (#1404)
28d6fd1
Run update-authors
19bce00
Format AUTHORS.md with hallmark
ad1fd1d
Merge pull request #1398 from standard/hallmark
d5ddd5e
Merge pull request #1399 from standard/greenkeeper/eslint-plugin-node-10.0.0
02d3ea6
fix(package): update eslint-plugin-node to version 10.0.0
dc3fea5
changelog: Run 'npx vweevers/hallmark'
There are 24 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Do you need to do an npm link pino-papertrail
so it can be called after the pipe?
If so, how would you do this in a docker container?
Right now it only streams the stdout not the stderr, is it because of any particular technical constraint?
My service was running and logging with pino to stdout. The stdout is piped to pino-papertrail.
My internet connection died and pino-papertrail could no longer submit logs to papertrail.
pino-papertrail logged the following to stdout:
events.js:174
throw er; // Unhandled 'error' event
^
Error: getaddrinfo EAI_AGAIN logs7.papertrailapp.com
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26)
Emitted 'error' event at:
at errorOrDestroy (internal/streams/destroy.js:107:12)
at Pumpify.onerror (_stream_readable.js:734:7)
at Pumpify.emit (events.js:198:13)
at Pumpify.Duplexify._destroy (/usr/local/lib/node_modules/pino-papertrail/node_modules/duplexify/index.js:195:15)
at /usr/local/lib/node_modules/pino-papertrail/node_modules/duplexify/index.js:185:10
at process._tickCallback (internal/process/next_tick.js:61:11)
After this pino-papertrail did not forward any logs to stdout and it did not log anything to papertrail.
After a few minutes, my internet connection was restored. pino-papertrail did however not resume logging to papertrail and it did not resume logging to stdout either.
Some hours later, I restarted my service and pino-papertrail and then logging started working again.
I would have expected pino-papertrail to continue logging to stdout the whole time, regardless of if it could forward logs to papertrail or not. I would also have expected it to resume logging to papertrail when internet connectivity was restored.
As the title says, would be nice to have the typescript definition included in the package.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.