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

Feature Request: Only Log Changes Made #124

Open
Frazzer951 opened this issue Mar 22, 2022 · 9 comments
Open

Feature Request: Only Log Changes Made #124

Frazzer951 opened this issue Mar 22, 2022 · 9 comments

Comments

@Frazzer951
Copy link

It would be nice to have an option in the settins to only log changes made, instead of showing all shows scanned.
With this option it would only log to the console when a missmatch in episode counts is found and updated.
This will make it easier to look at a docker's logs and just see the changes its made, instead of needing to sort through tons of unneeded logs.

@Soitora
Copy link

Soitora commented Mar 22, 2022

In that case, it should log even the "might be wrong" ones, like when it is missing End Year thing, any log that is not the default basic success one

Smh misread, thought it was changes not made

@reconman
Copy link
Collaborator

reconman commented Mar 22, 2022

Can't you achieve this result better by looking at your updates on the anilist page?

@Soitora
Copy link

Soitora commented Mar 24, 2022

I didn't fully read the thread before my comment, I thought they requested "Only log changes not made", i.e; errors
Maybe I should make an issue for it 🤔

@allquiet-hub
Copy link

It is still one of the few issues this project has. It would be very nice to be able to reduce the noise the logs generate. If something breaks it is not easy to track it down. For example these lines are superfluous:
image

If there was a declarable parameter for the log level to print, it would be nice.

@Soitora
Copy link

Soitora commented Dec 7, 2023

I agree, when I do a test run for example I'd prefer only seeing logs of

  1. Changes made
  2. Errors
  3. Warnings

Entries that are = Equal and thus no change needed, only flood the logs

@reconman
Copy link
Collaborator

reconman commented Dec 9, 2023

I changed some logs to debug level in the master branch.

Also I noticed that way that the logic for multiple anilist entries for 1 Plex season was broken. For example, PlexAniSync wanted to set completed entries with 13 episodes to a watched count of 50.

Anilist didn't do anything in that case, but now that situation should only happen if your mappings or Plex metadata are incorrect (for example having too many episodes in a Plex season compared to the TMDB season). You can currently detect it if you see Updating series: ... on every run.

I'll probably add another check so it logs something different when the watched count is greater than the total episodes of the Anilist entry.

@allquiet-hub
Copy link

Oh nice. I can confirm I no longer see the "Updating series: " message.
Now before change other logger levels maybe you could check on how to make the logs in docker not all go to stderr, but send only the errors to stderr and everything else to stdout. Maybe here is an example?
https://gist.github.com/oseme-techguy/8dc90d1808174fc4899bce448ea0e5de

@reconman
Copy link
Collaborator

reconman commented Dec 9, 2023

It prints to stderr because coloredlogs does so by default, but how are you planning on viewing stdout and stderr separately? docker logs normally shows the combined output of both.

@allquiet-hub
Copy link

allquiet-hub commented Dec 10, 2023

If you only open the docker logs then you are very correct, you cannot filter them just like that. But my end goal is to use the gelf logging driver, which will send the message logs with a field named level with value 3 for stderr and value 6 for stdout.
From what I can see PlexAniSync is the only selfhosted app that does not print anything to stdout.
As you can see the vast majority of the error messages come from PlexAniSync here:

image

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

No branches or pull requests

4 participants