Skip to content

Added syslogd functionality#30

Open
Cvetomird91 wants to merge 1 commit into
pCloud:masterfrom
Cvetomird91:master
Open

Added syslogd functionality#30
Cvetomird91 wants to merge 1 commit into
pCloud:masterfrom
Cvetomird91:master

Conversation

@Cvetomird91

Copy link
Copy Markdown

Hello,

I noticed that the pCloud console client didn't log messages to the Linux logging facility. I used syslog.h to add this functionality. I tested it on Fedora 25, which directly logs the messages to the systemd logging facility.

@sergeyklay

Copy link
Copy Markdown

How about this :)

https://github.com/pcloudcom/console-client/blob/2ecb7c981554499501f0a4f0512bd7a1a483645b/pCloudCC/lib/pclsync/plibs.h#L58-L60

As well as:

$ grep -E -nr 'tmp.*\.log' ./pCloudCC 2>/dev/null
./pCloudCC/lib/poverlay_linux/debug.h:25:#define DEBUG_FILE "/tmp/overlay_client.log"
./pCloudCC/lib/pclsync/plibs.h:59:#define DEBUG_FILE "/tmp/psync_err.log"
./pCloudCC/lib/pclsync/lib/poverlay/ShellExt.cpp:34:  _logfile.open("c:\\tmp\\overlaydll.log", std::fstream::out | std::fstream::app | std::fstream::ate);
./pCloudCC/lib/pclsync/lib/poverlay_linux/debug.h:25:#define DEBUG_FILE "/tmp/overlay_client.log"

@Cvetomird91

Copy link
Copy Markdown
Author

@sergeyklay thanks for addressing this PR. :) Do you suggest using those macros instead of logging to syslog?

@sergeyklay

sergeyklay commented Jul 8, 2021

Copy link
Copy Markdown

@Cvetomird91 I mean, this PR don't completely cover the idea of logging and actually just add +1 place where the logs might be. It would be better to either get rid of the files altogether, or write only to files (in terms of consistency and program design).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants