question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Http transport don't work

See original GitHub issue

I have this logger(version 2.4.0):

const winston = require('winston');

const logger = new winston.Logger({
    transports: [
        new winston.transports.Http({
            host: '127.0.0.1',
            port: 8787,
        }),
    ],
});

With this http server receiving the payload:

const http = require('http');

const server = http.createServer(function (req, res) {
    if (req.method == 'POST') {
        let body = '';
        req.on('data', function (data) {
            body += data;
        });
        req.on('end', function () {
            console.log('Body: ' + body);
        });
    }
    res.end();
});

server.listen(8787, '127.0.0.1');

I forced a error using logger.error(new Error('test')); and only receive this in the logger:

Body: {"method":"collect","params":{"level":"error","message":"","meta":{}}}

Any idea?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
thiagossampaiocommented, Jan 17, 2022

I have the same situation.

0reactions
ramonpaolocommented, Dec 4, 2022

same problem here

Read more comments on GitHub >

github_iconTop Results From Across the Web

Winston Http Transport not working inside MochaJS custom ...
I'm trying to log errors using Http Transport and it's not working properly inside the custom report EVENT_TEST_FAIL. transport.
Read more >
Remote Desktop Gateway - users getting Http transport
I only have one gateway configured which has been working fine. ... Http transport: IN channel could not find a corresponding OUT channel....
Read more >
Strict-Transport-Security - HTTP - MDN Web Docs
The HTTP Strict-Transport-Security response header (often abbreviated as HSTS) informs browsers that the site should only be accessed using ...
Read more >
HttpTransport (google-http-client 1.42.0) - javadoc.io
Class HttpTransport · com.google.api.client.apache.ApacheHttpTransport doesn't work on App Engine because the Apache HTTP Client opens its own sockets (though in ...
Read more >
EAI HTTP Transport - Oracle Help Center
The Send method means that the response coming back from the external application is not interpreted by the Siebel application, but the Web...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found