Comments (3)
I've known that. I'm going to use logrotate. Thanks.
from snoopy.
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.
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)
- Just a little question about reboot (or not) after installation. HOT 2
- install-snoopy.sh latest silently failing on Github release API rate limit HOT 4
- Log process exit time HOT 4
- Enable thread safety by default (starting with 2.5.0)
- object '/lib/x86_64-linux-gnu/libsnoopy.so' from /etc/ld.so.preload cannot be preloaded HOT 4
- Iron out cross compilation issues HOT 3
- some commands can't be recorded HOT 2
- Snoopy ignores config under /etc/ (building from source) HOT 3
- Ubuntu 18.04.6 LTS install error HOT 8
- exclude_spawns_of not working as expected HOT 10
- Build issue on the mips platform HOT 3
- Command line length limit HOT 8
- i686 builds of snoopy HOT 2
- Nice idea - didn't work HOT 2
- Test case failed - cli/cli-action-conf.sh HOT 3
- segfault when ls /a/b/c/* HOT 2
- How to get only user typing commands HOT 2
- snoopy for chroot HOT 2
- Install in cloud-init or using shell script HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snoopy.