Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

winston Papertrail connection error: TypeError: net.createConnection is not a function #93

Open
snair-user opened this issue Mar 25, 2020 · 0 comments

Comments

@snair-user
Copy link

snair-user commented Mar 25, 2020

I have added papertrail with winston, but facing below error on console. for every 5 sec this error was generated. I think papertrail trying to connect but not able to connect.

  1. Papertrail connection error: TypeError: net.createConnection is not a function
    at connectStream

  2. Papertrail connection error: Error: getaddrinfo EAI_AGAIN logsXX.papertrailapp.com

Package Versions:
"winston": "^2.4.4",
"winston-papertrail": "^1.0.5"

code in React:
// Import modules
import {winston, transports, createLogger, Logger} from 'winston'
import {Papertrail} from 'winston-papertrail'

// Logger configuration
const logConfiguration = {
//exitOnError: false,
transports: [
new Papertrail({
level: 'info',
colorize: true,
host:'logsX.papertrailapp.com',
port:XXXXX
})
]
};

var logger = new Logger(logConfiguration);

// Export the logger
export default logger;

Thnaks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant