Re: [systemd-devel] Append to logfile with year-month

2023-08-25 Thread Lennart Poettering
On Do, 24.08.23 09:48, Cecil Westerhof (cldwester...@gmail.com) wrote: > In a service file I can use: > StandardOutput=append:/var/log/root/aptCacheUsage.log > > but I want to use something like: > StandardOutput=append:/var/log/root/aptCacheUsage_$(date +%%Y-%%m).log > > Did does not work

Re: [systemd-devel] Append to logfile with year-month

2023-08-24 Thread Donald Buczek
Consider the ugly ExecStart=bash -c "whatever > /var/log/root/aptCacheUsage_$(date +%%Y-%%m).log 2>&1" or ExecStart=bash -c "whatever | cronolog /var/log/root/aptCacheUsage_%%Y-%%m.log 2>&1" Best Donald On 8/24/23 9:48 AM, Cecil Westerhof wrote: > In a service file I can use: >     Standa

Re: [systemd-devel] Append to logfile with year-month

2023-08-24 Thread Mantas Mikulėnas
On Thu, Aug 24, 2023 at 10:49 AM Cecil Westerhof wrote: > In a service file I can use: > StandardOutput=append:/var/log/root/aptCacheUsage.log > > but I want to use something like: > StandardOutput=append:/var/log/root/aptCacheUsage_$(date +%%Y-%%m).log > > Did does not work, because this