Coder Social home page Coder Social logo

add date for ouput filename about snoopy HOT 3 CLOSED

xleng2019 avatar xleng2019 commented on June 26, 2024
add date for ouput filename

from snoopy.

Comments (3)

xleng2019 avatar xleng2019 commented on June 26, 2024 1

I've known that. I'm going to use logrotate. Thanks.

from snoopy.

bostjan avatar bostjan commented on June 26, 2024

Hey @xleng2019, no, you're not doing it wrong - it is just (currently) not supported.

Question: why are you trying to implement the log rotation with Snoopy itself? Why not just use existing tools (i.e. logrotate) that already rotate other logs on your system? Just curious, and describing actual real word use cases usually helps with decisions what to implement in the future.

PS: Technically, to work around this right now, you could run a socat UNIX-RECV:/var/run/snoopy.sock STDOUT | chronolog /var/log/snoopy_%Y-%m-%d in the background, and use output = socket:/var/run/snoopy.sock in your snoopy.ini to achieve the desired result. A bit convoluted approach, but it should work.

PPS: Where did you get the idea to try the $(...) syntax from? It's not used anywhere within Snoopy right now. I would kinda understand you trying to use the %{...} syntax, since that is used in the message_format setting already (and in the syslog_ident setting in the upcoming version), but $(...) is definitely nowhere to be seen. :)

PPPS: Shouldn't be too hard to implement, though, and it's an interesting suggestion. Thanks.

from snoopy.

bostjan avatar bostjan commented on June 26, 2024

Hey @xleng2019, you're in luck - some unrelated refactoring made implementing this feature very easy ;)

It is currently already available in master, and it will be released with Snoopy v2.5.0 soon. Enjoy.

from snoopy.

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.