-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Outchannel parsing is not working #5047
Comments
I don't believe you would use $ in the omfile output line
David Lang
…On Thu, 22 Dec 2022, yishai1999 wrote:
Date: Thu, 22 Dec 2022 00:53:33 -0800
From: yishai1999 ***@***.***>
Reply-To: rsyslog/rsyslog
***@***.***>
To: rsyslog/rsyslog ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [rsyslog/rsyslog] Outchannel parsing is not working (Issue #5047)
Hi!
I'm trying to configure log rotation but facing some problems.
My rsyslog.conf file looks like this:
```
$outchannel logrotation,/var/log/syslog,1048576,/etc/rotate_logs.sh
*.* :omfile:$logrotation
```
Then I run rsyslog in debug mode and I expect the debug logs to be something like this:
```
Outchannel: Name='logrotation'
File Template: '/var/log/syslog'
Max Size.....: 1048576
OnSizeLimtCmd: '/etc/rotate_logs.sh
```
But what I see is:
```
Outchannel: Name='logrotation'
File Template: '/var/log/syslog'
Max Size.....: 0
OnSizeLimtCmd: '1048576,/etc/rotate_logs.sh
```
When trying to add more debug prints in the source code around the parsing of the configuration file, somehow the problem is solved, and then when I remove them the problem comes back.
I tried changing the conf file by adding spaces between commas, changing the max size, changing the command - nothing helped
I found someone who wrote about the same issue 12 years ago but no one gave him an answer: https://rsyslog.adiscon.narkive.com/2Vu9McFr/outchannel-is-not-working#post1
My environment:
- rsyslog version: 8.2206.0
- platform: Custom Yocto distribution (kirkstone)
- gcc 11
- armv7
|
Hey @davidelang , |
This problem happened to me to! Any updates? |
Hi, |
Hi, Here's the diff:
Since the print fixes the problem I assume the problem has something to do with time/synchronization. |
@yishai1999 a time/synchronization problem would be very weird. Since this change should be free of influence, it would be possible to make this as a pull request for this issue. |
@SchorppDA Very very strange stuff. Your change looks good to me. Go ahead an open a pull request! If you rather I open it let me know. |
FYI: new style alternative coming up: #5063 |
Hi!
I'm trying to configure log rotation but facing some problems.
My rsyslog.conf file looks like this:
Then I run rsyslog in debug mode and I expect the debug logs to be something like this:
But what I see is:
When trying to add more debug prints in the source code around the parsing of the configuration file, somehow the problem is solved, and then when I remove them the problem comes back.
I tried changing the conf file by adding spaces between commas, changing the max size, changing the command - nothing helped
I found someone who wrote about the same issue 12 years ago but no one gave him an answer: https://rsyslog.adiscon.narkive.com/2Vu9McFr/outchannel-is-not-working#post1
My environment:
The text was updated successfully, but these errors were encountered: