Skip to content

Logs to stderr? not good for tee command for example #25

@boussou

Description

@boussou

hello, why choosing to log to stderr?

I wanted to tee the logs, and I am forced to write this:

redir --lport=XXX --laddr=$ME --cport=XXX --caddr=$target -l info 2>&1 | tee /var/log/redir-`date +%Y-%m-%d-%H%m%S`.log

the trick is " 2>&1 ".
It works, but it is far from perfect for use (you can lose the log depending on what happens to the console)

Why not directly logging to STDOUT as usual?

Best, I would love to be able to log to /var/log, in a separate file, with a format like info level, improved with the timestamp and the PEER IP
ie

timestamp: Connecting PEER:port => TARGET:port

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions