Coder Social home page Coder Social logo

Comments (5)

mattberther avatar mattberther commented on June 26, 2024

Cant reproduce this error:

matt@amnesia /src/winston-daily-rotate-file
± |master ✗| → nodenv local 6.9.1 

matt@amnesia /src/winston-daily-rotate-file
± |master ✗| → npm test

> [email protected] test /src/winston-daily-rotate-file
> mocha && eslint .

  winston/transports/daily-rotate-file
    an instance of the transport
      with default datePatterns
        ✓ should have a proper filename when prepend option is false
        ✓ should have a proper filename when prepend option is false (localtime)
        ✓ should have a proper filename when prepend options is true
        ✓ should remove leading dot if one is provided with datePattern
        ✓ should not add leading dot if one is not provided with datePattern
        ✓ should remove leading dot if one is provided with datePattern when prepend option is true
      when passed a valid file
        ✓ should have the proper methods defined
        with the error level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the warn level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the info level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the verbose level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the debug level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the silly level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
      when passed a valid stream
        ✓ should have the proper methods defined
        with the error level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the warn level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the info level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the verbose level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the debug level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the silly level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
      when passed a valid prepended file
        ✓ should have the proper methods defined
        with the error level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the warn level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the info level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the verbose level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the debug level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the silly level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
      when passed a valid weekday file
        ✓ should have the proper methods defined
        with the error level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the warn level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the info level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the verbose level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the debug level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the silly level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
      when passed a valid prepend weekday file
        ✓ should have the proper methods defined
        with the error level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the warn level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the info level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the verbose level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the debug level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
        with the silly level
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed no metadata
          ✓ should respond with true when passed object metadata
          ✓ should respond with true when passed primitive metadata
          ✓ should respond with true when passed circular metadata
      when passed an invalid filename
        ✓ should have proper methods defined
        ✓ should enter noop failed state
      when passed an valid filename with different date patterns for log rotation
        when passed the pattern full year pattern .yyyy
          ✓ should create log with proper timestamp
        when passed the pattern small year pattern .yy
          ✓ should create log with proper timestamp
        when passed the pattern month pattern .M
          ✓ should create log with proper timestamp
        when passed the pattern zero padded month pattern .MM
          ✓ should create log with proper timestamp
        when passed the pattern daypattern .d
          ✓ should create log with proper timestamp
        when passed the pattern zero padded day pattern .dd
          ✓ should create log with proper timestamp
        when passed the pattern hour pattern .H
          ✓ should create log with proper timestamp
        when passed the pattern zero padded hour pattern .HH
          ✓ should create log with proper timestamp
        when passed the pattern minute pattern .m
          ✓ should create log with proper timestamp
        when passed the pattern zero padded minute pattern .mm
          ✓ should create log with proper timestamp
        when passed the pattern daily rotation pattern .yyyy-MM-dd
          ✓ should create log with proper timestamp
      when passed with maxsize and maxfiles
        when passed the pattern .yyyy-MM-dd
          ✓ should properly rotate log with old files getting deleted
      when passed with maxfiles set and maxsize not set
        when passed the pattern .yyyy-MM-dd and no maxsize
files : test-rotation-no-maxsize.log.2029-01-02,test-rotation-no-maxsize.log.2029-01-03
          ✓ should properly rotate log without maxzsize set and with old files getting deleted


  176 passing (233ms)


/src/winston-daily-rotate-file/index.js
  278:3  warning  Unexpected 'todo' comment  no-warning-comments

✖ 1 problem (0 errors, 1 warning)

from winston-daily-rotate-file.

Apollon77 avatar Apollon77 commented on June 26, 2024

I also tested further: in live i also can not reproduce it, but when travis-ci is used to test things it breaks with this error ... any idea why?!
see https://travis-ci.org/Apollon77/ioBroker.nut (don't know if reachable from outside)

from winston-daily-rotate-file.

mattberther avatar mattberther commented on June 26, 2024

Im not really sure -- the travis build for this project runs just fine.

from winston-daily-rotate-file.

Apollon77 avatar Apollon77 commented on June 26, 2024

SOLVED: The reason whs an "unmet peer dependency" with npm 3.x and that's why it seems that something was not correctly installed. very strange. After manually installing winston before the real project in travis.yml it worked.
Maybe helps someone else too :-)

from winston-daily-rotate-file.

mattberther avatar mattberther commented on June 26, 2024

Great! Thanks for following up. :)

from winston-daily-rotate-file.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.