YIO-Remote / remote-software

💎 YIO Remote Software repository
GNU General Public License v3.0
164 stars 21 forks source link

Logger: use provided log directory without appending ./log #361

Closed zehnm closed 4 years ago

zehnm commented 4 years ago

Description

The logger doesn't use the provided log path as output directory. It appends a hard coded /log subdirectory.

How to Reproduce

Steps to reproduce the behavior:

  1. Start app
  2. See logfiles in subdirectory of configured log directory

Expected behavior

The Logger uses the provided log path and doesn't change the path.

Your Environment

Additional context

Different environments have specific requirements for log files. E.g. on Linux the default log output is /var/log. Even though this would be possible with a log path setting of /var, this is very confusing and not expected behavior. If we'd like to log it into /var/log/yio this is currently not possible.

ChristianRiedl commented 4 years ago

Originally log was written in the directory of the executable. I only changed it to write into a seperate directory. Nobody specified where the log files should be written. So its a feature, not a bug.

zehnm commented 4 years ago

That's debatable but doesn't matter in the end :-) If there's a path configuration then I believe the caller can expect that this exact path is being used (it's called path, not basePath). Furthermore, the method documentation says: // path : directory for log file, if empty no log file

ChristianRiedl commented 4 years ago

Fixed, pull logger_integrations

zehnm commented 4 years ago

Thanks, I merged logger_integrations to dev. Please create a dedicated PR for fixes in the future.