RoCat / winston-journald

MIT License
2 stars 5 forks source link

Not working for me #7

Closed k1tzu closed 7 years ago

k1tzu commented 7 years ago
require('winston-journald').Journald;
winston.setLevels(winston.config.syslog.levels);

const logger = new (winston.Logger)({
    transports: [
        new (winston.transports.Console)({
            }),
        new (winston.transports.Journald)({
        })
    ],exitOnError:false

});

logger.error("HELLO WORLD!");

I see message in the console, but I see nothing in the journald. Arch Linux 3.14.79+ aarch64

RoCat commented 7 years ago

Hello, Tryed the exact same code (just adding var winston = require('winston') at the top, I assume you did it too)

works on my configuration: nodejs: 6.10.0 ubuntu 16.04 kernel 4.4.0-72-generic systemd 229

k1tzu commented 7 years ago

I've ended up with a working solution:

const Journald = require( 'systemd-journald' );
const logger = new Journald( { syslog_identifier: "myprog" } );
logger.error("HELLO WORLD!");

Who knows what was wrong with that one - maybe 3.x kernel or older systemd. I saw no debug/error messages from winston also.