Skip to content
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

Option quarkus.log.syslog.max-length ignores text of the message #41166

Open
fedinskiy opened this issue Jun 12, 2024 · 4 comments
Open

Option quarkus.log.syslog.max-length ignores text of the message #41166

fedinskiy opened this issue Jun 12, 2024 · 4 comments
Labels
area/logging kind/bug Something isn't working

Comments

@fedinskiy
Copy link
Contributor

fedinskiy commented Jun 12, 2024

Describe the bug

I have an application, which writes its logs into syslog. I use option quarkus.log.syslog.max-length to limit the length of the message. Despite that, when I log very long message (which contains more chars, than max-length), the message is not filtered.

Expected behavior

The long message is filtered.

Actual behavior

The message goes to syslog

How to Reproduce?

  1. git clone git@github.com:fedinskiy/reproducer.git -b syslog && cd reproducer . You can notice, that file application.properties contains this line: quarkus.log.syslog.max-length=64
  2. Start a syslog server, which will output received logs to the console: podman run -p 8514:514 -v $(pwd)/syslog.conf:/etc/syslog-ng/syslog-ng.conf:z --rm -it balabit/syslog-ng
  3. Start the app: mvn clean quarkus:dev
  4. curl localhost:8080 — syslogs console now contains a short message "Jun 12 16:40:43 localhost quarkus[111635]: INFO Root access"
  5. curl localhost:8080/long syslogs now contains a long message "Jun 12 16:42:18 localhost quarkus[111635]: INFO Message, which is very long and is not expected to fit into 64 bytes"
  6. Check the length of the message:
$ echo "Message, which is very long and is not expected to fit into 64 bytes" | wc --chars --bytes
     69      69
  1. If we use more verbose logging format ( mvn clean quarkus:dev -Dquarkus.profile=format), both short and long messages are not shown, which is more or less expected

Output of uname -a or ver

6.7.3-200.fc39.x86_64

Output of java -version

Java version: 21.0.1, vendor: Eclipse Adoptium

Quarkus version or git rev

3.11.1

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)

Additional information

No response

@fedinskiy fedinskiy added the kind/bug Something isn't working label Jun 12, 2024
@fedinskiy
Copy link
Contributor Author

The option was introduced in this PR: #39958

Copy link

quarkus-bot bot commented Jun 13, 2024

/cc @dmlloyd (logging)

@dmlloyd
Copy link
Member

dmlloyd commented Jun 17, 2024

/cc @jamezp, I don't see any obvious cause for this. WDYT?

@jamezp
Copy link
Contributor

jamezp commented Jun 17, 2024

Is the truncate configuration property set? It defaults to false which would mean a long message is split into multiple payloads and sent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/logging kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants