Code Monkey home page Code Monkey logo

Comments (3)

SergiusTheBest avatar SergiusTheBest commented on August 17, 2024

Truncating a file you loses previous log entries. This is not good: imagine an application that crashed and restarted - all logged information is lost in such case.
What problem do you want to solve with truncation? Maybe there is an another solution?

from plog.

KarateSnowMachine avatar KarateSnowMachine commented on August 17, 2024

Our logs tend to be transient -- they are only relevant for any given run of the program (we aren't using plog for a long-running daemon or server application or anything like that). When we run interactively, there's really no reason for us to save log messages from previous runs. When we run in batch, we save the logs to different directories, so this isn't an issue.

I realize this is probably very different than how others use this library. For our internal plog, I've added O_TRUNC to open() just to force this behavior. I was just wondering if you saw any value into having this option available upstream. Perhaps as a different Appender? If not, that's understandable, you can close this issue.

from plog.

SergiusTheBest avatar SergiusTheBest commented on August 17, 2024

I see now. It makes sense in your case but it's not common. I'm closing the issue but thanks anyway!

from plog.

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.