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

no console logs for release builds #2201

Merged
merged 1 commit into from
Feb 13, 2023
Merged

no console logs for release builds #2201

merged 1 commit into from
Feb 13, 2023

Conversation

smk762
Copy link
Collaborator

@smk762 smk762 commented Jan 21, 2023

Closes #2171
To test:

  • Launch on linux from file manager.
  • In console, do tail -f /var/log/syslog.
  • You should not see any Atomicdex related logs in syslog.
  • Confirm launch on Mac and Windows works as expected.

cc: @himu007

@tonymorony
Copy link

tonymorony commented Jan 21, 2023

I believe the problem mentioned in issue was not the logs itself but the fact that logs writing into syslog file

what is the QT feature introduced in 0.5.6

https://www.ics.com/blog/whats-new-qt-560-logging-syslog-and-journald

To enable the syslog or journald logging support in Qt 5.6.0 or later, you need to configure it into Qt. They default to being disabled, so you need to explicitly use the -journald or -syslog options when running the configure script. If successfully enabled, you should see the relevant output of the configure script indicate it as being enabled, as shown below:

  Logging backends:
    journald ............... yes
    syslog   ............... yes

so just logging backend removal is needed (we do have timestamped logs file on every session so no need to write it to other places)

why do we need temp.txt log file?

@smk762
Copy link
Collaborator Author

smk762 commented Jan 21, 2023

I saw that article when investigating the problem.

you need to configure it into Qt. They default to being disabled

App is not configured to write to syslog.

you need to explicitly use the -journald or -syslog options when running the configure script.

The strings syslog & journald do not exist anywhere in the source code, workflows or build scripts.

why do we need temp.txt log file?

This is a way to get the response returned from https://github.com/KomodoPlatform/atomicDEX-Desktop/blob/dev/src/core/atomicdex/utilities/kill.cpp#L29 so that mm2: no process found wont show up in console / syslog when app tries to kill existing instances of mm2 when there were none running.

More context: #2171 (comment)

Copy link
Member

@cipig cipig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this disables console log completely
if that is the intention, then it works
can't tell anything about syslog though, it didn't had that problem on linux myself

@smk762
Copy link
Collaborator Author

smk762 commented Jan 23, 2023

can't tell anything about syslog though, it didn't had that problem on linux myself

Did you launch from file manager? If so do you know which one?

@cipig
Copy link
Member

cipig commented Jan 23, 2023

Did you launch from file manager? If so do you know which one?

Oh... no, i didn't... just unpacked and started AntaraAtomicDexAppDir/usr/bin/atomicdex-desktop from console

@himu007
Copy link

himu007 commented Jan 23, 2023

@smk762 do you have a build file that i can test?

Edit: found a build to test https://github.com/KomodoPlatform/atomicDEX-Desktop/actions/runs/3973225190

@cipig
Copy link
Member

cipig commented Jan 23, 2023

Ok, i unzipped on CLI and started with FileManager (which doesn't make that much sense, since it's more work to switch to file manager and click me through till i get to the place where the binary is located... but ok, just to test)
seeing this in syslog

Jan 23 17:50:59 Flow-PC systemd[1202]: Started Dolphin - File Manager.
Jan 23 17:51:23 Flow-PC systemd[1202]: Started /home/florian/Tools/AntaraAtomicDexAppDir/usr/bin/atomicdex-desktop.

but that's it, nothing more in syslog
btw, you need to do sudo tail -f /var/log/syslog, because syslog can't be read by random users, only root can do that

@himu007
Copy link

himu007 commented Jan 23, 2023

@cipig

btw, you need to do sudo tail -f /var/log/syslog, because syslog can't be read by random users, only root can do that

my Ubuntu 20.04 Desktop is installed with one 1 user (non-root) account and i can tail the syslog file without sudo. It's just the default installation using the desktop ISO file from Ubuntu website without any extra setup/steps.

though it is not possible in my server running Debian, where user setup is same. i am guessing it varies depending on OS/flavor.

@himu007
Copy link

himu007 commented Jan 23, 2023

@smk762 it appears the issue i was seeing is fixed with builds from this PR
only entry in syslog i found after i started the AppImage file is:

Jan 23 18:11:48 x org.gnome.Nautilus[209740]: [2023-01-23 18:11:48.306] [info] [global.utilities.cpp:65] creating directory /home/user/.atomic_qt/logs

i no longer see the full logs being shown in syslog file.

Copy link

@SirSevenG SirSevenG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't seen app logs in syslog here

@smk762
Copy link
Collaborator Author

smk762 commented Jan 27, 2023

@tonymorony please merge if you are happy with this PR in its current state.

@tonymorony tonymorony merged commit 08f4975 into dev Feb 13, 2023
@smk762 smk762 mentioned this pull request Mar 6, 2023
@smk762 smk762 deleted the no_syslog_for_release branch August 7, 2023 07:38
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.

[BUG]: info log being redirected to /var/log/syslog file
5 participants