Skip to content

Log output redirected to stderr #1301

@Regalasamus

Description

@Regalasamus

Introduction

Hello,
I've noticed that my logs are all redirected to StandarError instead of StandardOutput.
Is there no way to only send error logs to stderr and normal logs to stdout?

To Reproduce

Start a sqlpage binary with StandardOutput and StandardError defined in a service as such:

[Unit]
Description=Test app
After=network.target

[Service]
ExecStart=/opt/app/sqlpage.bin
WorkingDirectory=/opt/app
Restart=always
User=appuser
Group=appuser
Environment=RUST_LOG=info
StandardOutput=append:/var/log/app.sqlpage.log
StandardError=append:/var/log/app.sqlpage-error.log

[Install]
WantedBy=multi-user.target

Actual behavior

All of the logs are redirected to StandardError.
The file /var/log/app.sqlpage.log is empty
The file /var/log/app.sqlpage-error.log contains all the logs

Expected behavior

Normal logs are sent to StandardOutput.
Error logs are sent to StandardError.

Version information

  • OS: Debian 13
  • Database: Postgres
  • SQLPage Version: 0.44.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions