Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 15:14
    indexzero commented #1498
  • Jan 31 2019 15:13
    indexzero commented #1498
  • Jan 31 2019 15:04
    kbirger commented #1498
  • Jan 31 2019 13:01
    indexzero commented #1591
  • Jan 31 2019 13:01
    indexzero closed #1591
  • Jan 31 2019 12:59
    papandreou commented #1591
  • Jan 31 2019 10:41
    papandreou commented #1591
  • Jan 31 2019 10:40
    kibertoad commented #1591
  • Jan 31 2019 09:50
    papandreou opened #1591
  • Jan 30 2019 23:01
    DanielRuf opened #1590
  • Jan 30 2019 16:33
    ahce edited #1588
  • Jan 30 2019 16:32
    ahce closed #1587
  • Jan 30 2019 16:32
    ahce commented #1587
  • Jan 30 2019 15:29
    ColinMorris83 commented #1577
  • Jan 30 2019 15:07
    indexzero commented #1577
  • Jan 30 2019 14:56
    ColinMorris83 commented #1577
  • Jan 30 2019 14:33
    sapsaldog commented #1501
  • Jan 30 2019 14:30
    kibertoad commented #1501
  • Jan 30 2019 14:29
    sapsaldog commented #1501
  • Jan 30 2019 14:28
    kibertoad commented #1577
Wilson López
@wlopez-enkoding
@ethanrubio were you able to print defaultMeta to the logs ?
Wilson López
@wlopez-enkoding
Solved, it only prints defaultMeta when I use logger.error
Stephen Hendricks
@z1haze
anyone know where the documentation regarding the format.errors() is? for such an extensive lib i feel like the documentation is lacking a lot
@wlopez-cl where did you learn what format.errors({ stack: true }) does? I am not able to find the information on this
Stephen Hendricks
@z1haze
my testing the {stack: true} does absolutely nothing to the log result
even setting it to false changes nothing
Adam Lee
@adamlee-ARC
Is winstond still the preferred http transport endpoint?
Looks pretty outdated.
Adam Lee
@adamlee-ARC
Spun up my own http server and hooked a Winston logger into the requests - pretty easy.
Jonas Ulrich
@julrich

Hey everyone. Short question regarding the possibility of hooking into events related to logging messages:
Is there a way to register a handler function somewhere, which will be called for every 'logging'-event? Found some references to such an event on StackOverflow, but was completely unable to get code to run that actually works.

I see there's an _onEvent handler function theoretically bubbling up events from transports to the logger, but only error and warn seem to be passing through that.

Jonas Ulrich
@julrich
I think I figured it out! It's the 'data' event, as per Nodes Transform Stream documentation, which is in use here with objectMode :thumbsup:
elinskytap
@elinskytap
hello, does anyone import daily-rotate-logger-file package and see this error Uncaught TypeError: Cannot set property 'DailyRotateFile' of undefined?
Mohamed El Sayad (Anubis)
@melsayad
Hey everyone, I tried to help by define a new way to configure winston using .json file, please check https://www.npmjs.com/package/winston-sugar
Thomas Chiantia
@TomzBench
Is everybody installing winston by using github master? Is there something going on with a release?
For context I am using typescript and there seems to be a lot of typescript fixes that arent published...
Thomas Chiantia
@TomzBench
@indexzero
Shankar Singh
@Shankar-khati
@here anyone facing this multiple callback issue?? with latest version??
NodeError: Callback called multiple times
File "<WORKSPACE>/node_modules/readable-stream/lib/_stream_transform.js", line 82, col 31, in DerivedLogger.afterTransform
return this.emit('error', new ERR_MULTIPLE_CALLBACK());
File "<WORKSPACE>/node_modules/winston/lib/winston/logger.js", line 310, col 7, in DerivedLogger._transform
callback();
File "<WORKSPACE>/node_modules/readable-stream/lib/_stream_transform.js", line 177, col 10, in DerivedLogger.Transform._read
this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
File "<WORKSPACE>/node_modules/readable-stream/lib/_stream_transform.js", line 164, col 83, in DerivedLogger.Transform._write
if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
File "<WORKSPACE>/node_modules/readable-stream/lib/_stream_writable.js", line 409, col 139, in doWrite
{snip} new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
File "<WORKSPACE>/node_modules/readable-stream/lib/_stream_writable.js", line 398, col 5, in writeOrBuffer
doWrite(stream, state, false, len, chunk, encoding, cb);
File "<WORKSPACE>/node_modules/readable-stream/lib/_stream_writable.js", line 307, col 11, in DerivedLogger.Writable.write
ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
File "<WORKSPACE>/node_modules/winston/lib/winston/logger.js", line 223, col 12, in DerivedLogger.log
this.write({ [LEVEL]: level, level, message: msg });
Any Workaround or stable version where it is fixed??
nolan
@noolaan
Hey-- how come the default winston transports don't log debug messages?
Or anything other than "info" and "error" types.
Richard Itimi
@itimirichard

Hi, I've recently been getting this warning

(node:26105) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unpipe listeners added to [File]. Use emitter.setMaxListeners() to increase limit
(node:26105) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [File]. Use emitter.setMaxListeners() to increase limit
(node:26105) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [File]. Use emitter.setMaxListeners() to increase limit
(node:26105) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [File]. Use emitter.setMaxListeners() to increase limit
(node:26105) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 finish listeners added to [File]. Use emitter.setMaxListeners() to increase limit
(node:26105) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 uncaughtException listeners added to [process]. Use emitter.setMaxListeners() to increase limit

I know there's been some discussions around this in the past, but couldn't find anything definitive in terms of a solution. I currently only use one winston logger instance across my application. I don't see this warning being logged to my log file, so I'm suspecting this might have something to do with the this.setMaxListeners(30) in the Console.js file

tagyoureit
@tagyoureit
If you leave a page and come back you might be accidentally adding the same listener multiple times. I've used emitter.listeners in the past to view all listeners and find accidental duplicates.
Richard Itimi
@itimirichard
How did you use the emitter.listeners precisely?
1 reply
Richard Itimi
@itimirichard
Hey, I still need your help with the above issue. Thanks
Jared
@jaredjacob667
Has anyone here still seen the "self._addDefaultMeta is not a function"error anymore?
I have been getting this VERY randomly. I am using the "winston": "3.2.1" and
"winston-daily-rotate-file": "3.10.0" on node 8.10.
F★
@storyofstella_twitter
Hi, I need some help configuring winston, would be cool if you could have a look at this: https://stackoverflow.com/questions/61525425/configuring-winston-logger
luno
@luciano-nascimento
hi
someone here
Collignon-Ducret Rémi
@miton18
Yes
Matthew B White
@mbwhite
Hello - the issue about the change to use git to pull a dependency is causing a quite a bit of stress; what's the current thinking on this issue?
Clemens E.
@Clemens-E
you would probably do that in the log function, where it says
"// Perform the writing to the remote service"
and after your request finished you call the callback
@LiSa20120
Koopa
@CodingKoopa_gitlab

Hiya, I'm having some trouble migrating my project to Winston 3.0. I have my log levels set up so that I can use my logger with statements like logger.Info("log message"). This is what the working <3.0 logger looks like: https://gitlab.com/CodingKoopa/lionbot/-/blob/2cc1c07d8e6c6f5e2a71dbbceaf0231a945d22d6/Source/Logger.js.

Having migrated to 3.0, this is what it now looks like: https://hastebin.com/ukujojiwik.js. The issue that I'm having is that the log levels no longer seem to be working. With test code:

Logger.log(`Info`, `test`);
Logger.Info(`test`);

I get:

[winston] Unknown logger level: Info
Server.js:13
Logger.Info(`test`);
       ^

TypeError: Logger.Info is not a function
Bedirhan Tuhana
@v30xy
Hello everyone. I'm logging but returning object. I just want message. How? Here is my createLogger config.
createLogger({
  transports: [
    new transports.Console()
  ],
  format: format.combine(
    format.colorize({ all: true }),
    format.simple()
  )
});
Bedirhan Tuhana
@v30xy
thanks
Lean Junio
@leanjunio
Has anybody gotten this error? TypeError: this.format.transform is not a function
I'm just trying to use winston regularly
Jason Ish
@jasonish
When I console.log the info object passed into my printf formatter, I see the splat as [Symbol(splat)]: [ ... ]... How can I get at this object inside the info object..
Jakub Sochalec
@thejakso
hello, i'm new with winston package, i've looked trough docs but i didn't found what i was looking for, i want to place timestamp in front of logs (for example: "[timestamp] log entry") any idea how can i achieve that?
Carl-Clemens Ebinger
@ccebinger
Hello, i use winston and winston-syslog in NestJS. What i miss, is a .info-method at the logger. Is the default log-level for .log-method 'info'? How do I log at log-level 'info'? Thank You. Best, ccebinger
VenomousSteam81
@VenomousSteam81
hi. how do i make winston show date and time of a log
2 replies
VenomousSteam81
@VenomousSteam81
hello? anyone there
Nils-Erik Frantzell
@halfalicious
Hi all, is the team engaged here at all?
idir
@iDumbo_gitlab
Hello all
i try to use https://www.npmjs.com/package/winston-daily-rotate-file but i have this error :
 $ node ./test/exemples/exemple_log.js 
file:///home/pi/git/crypto-player/test/exemples/exemple_log.js:27
const transport = new winston.transports.DailyRotateFile({
                                         ^

TypeError: Cannot read property 'DailyRotateFile' of undefined
    at file:///home/pi/git/crypto-player/test/exemples/exemple_log.js:27:42
    at ModuleJob.run (node:internal/modules/esm/module_job:183:25)
    at async Loader.import (node:internal/modules/esm/loader:178:24)
    at async Object.loadESM (node:internal/process/esm_loader:68:5)
    at async handleMainPromise (node:internal/modules/run_main:63:12)
Alexander Stout
@StoutyAlex
Shame to see this project seems no longer maintained. There are breaking bugs around bundling for us in winston/logform and have no choice to stop using winston even though there has been a Open PR since October 2020 that fixes our issue
denq04
@denq04
Winston 3.3.0, receiving this
format: winston.format.json(),
TypeError: Cannot read property 'json' of undefined
Kacper
@K4CZP3R
How do you import winston
David Hyde
@DABH
We are moving the winston real-time discussion to Discord https://discord.gg/vNMmYS3m . The community can decide whether this is useful or not. In the meantime, bugs with Winston itself can be reported on GitHub, and general usage questions / support may be best routed to StackOverflow using the winston tag. We have several folks helping maintain the repo now, so releases are happening again :tada:

Personally I will be deleting the gitter app from my devices.

Here is a link with the discussion leading up to this decision -- if you want to talk about it, you can add discussion there: winstonjs/winston#2027