October 11, 20178 yr I created a semi-manual docker for the Harmony-api using this file. It works fine and when I click on the Docker from the unRAID UI I can see the log. But I can't figure out what file the log is actually stored in. Should it be in /var/log? I don't see anything there. I am concerned that this log will grow to be very large as it is constantly polling the Logitech Harmony hubs on my LAN. It seems that it will grow to at least a few hundred kB per day. Is there any way to have the log flush every day or X number of bytes?
October 11, 20178 yr Author Ok - I think I have found this. It is in the painfully named /var/lib/docker/containers/123456789074329872398471204271304723094872307234/ folder where the last parameter is the Container ID. Is that correct? And why use the Container ID rather than the docker name? That makes it a pain to find the correct docker. How do I limit the size of the log file? Or is this best done from within the application?
October 11, 20178 yr Ok - I think I have found this. It is in the painfully named /var/lib/docker/containers/123456789074329872398471204271304723094872307234/ folder where the last parameter is the Container ID. Is that correct? And why use the Container ID rather than the docker name? That makes it a pain to find the correct docker. How do I limit the size of the log file? Or is this best done from within the application?https://forums.lime-technology.com/topic/57181-real-docker-faq/?tab=comments#comment-564326Sent from my SM-T560NU using Tapatalk
June 20, 20188 yr Is it possible to add a share in the logs folder so i can copy the log file to windows PC ? I need to send a complete log file to a vendor (google) but I cant figure out how to copy the whole log to a windows PC.
June 20, 20188 yr 4 hours ago, jj_uk said: Is it possible to add a share in the logs folder so i can copy the log file to windows PC ? I need to send a complete log file to a vendor (google) but I cant figure out how to copy the whole log to a windows PC. Not sure about creating a share, but you should be able to use the Config File Editor plugin to open the log file in your browser and just copy/paste to a text file.
June 24, 20188 yr On 6/20/2018 at 11:30 PM, Squid said: docker logs nameOfContainer > /boot/containerLog.txt Thanks. I run this command: docker logs google-music-uploader > /boot/containerLog.txt and the log scrolls up the screen, the file "containerLog.txt" is created but it's empty. Edited June 24, 20188 yr by jj_uk
June 24, 20188 yr 2 minutes ago, Squid said: post the exact command you're using root@tower1:/# docker logs google-music-uploader > /boot/containerLog1.txt
June 24, 20188 yr Nothing should be displayed on the screen at all. Command works for me if I change the name of the container no problems
June 24, 20188 yr 55 minutes ago, jj_uk said: Thanks. I run this command: docker logs google-music-uploader > /boot/containerLog.txt and the log scrolls up the screen, the file "containerLog.txt" is created but it's empty. Sounds like the log data is emitted to standard error instead out standard out - then you will see the text scroll on the screen while a zero-size file is created. Output emitted to standard error can be redirected with the following - the number 2 represents the stderr output stream. cmd 2> file
June 24, 20188 yr Yes, this worked. Any ideas why its going to the error stream instead of the file stream? (unRAID version 6.5.3) Edited June 24, 20188 yr by jj_uk
June 24, 20188 yr 31 minutes ago, jj_uk said: Yes, this worked. Any ideas why its going to the error stream instead of the file stream? (unRAID version 6.5.3) Docker captures both stdout and stderr output. https://docs.docker.com/config/containers/logging/ For information about redirection, see the following link: https://askubuntu.com/questions/625224/how-to-redirect-stderr-to-a-file But > redirects stdout. And 2> redirects stderr. And &> redirects both. Or you can do: cmd > outfile 2>&1
November 23, 20205 yr Are you sure that's not the output from the docker logs command? It's kinda weird the way the command works because it outputs to stderr the errors in the logs. You need to add 2>&1 to the command to also send the errors to the file
November 26, 20214 yr I have a slightly different but related question. When I upgrade a docker app, there is a pop up with details about the upgrade. After the upgrade completes and I close that window and later find out that the upgrade failed, how do I know what the previous version of the docker image was? It's always set to xxx:latest in the template so there's no way of knowing after the operation completes what it was before. Is this information/log saved anywhere? When filing an issue/ticket against the app, I'd like to know what the source and destination versions where that caused the failure.
November 26, 20214 yr 2 hours ago, frakman1 said: I have a slightly different but related question. When I upgrade a docker app, there is a pop up with details about the upgrade. After the upgrade completes and I close that window and later find out that the upgrade failed, how do I know what the previous version of the docker image was? It's always set to xxx:latest in the template so there's no way of knowing after the operation completes what it was before. Is this information/log saved anywhere? When filing an issue/ticket against the app, I'd like to know what the source and destination versions where that caused the failure. Typically you can view past releases on the dockerhub page for that docker.
November 26, 20214 yr 20 hours ago, wgstarks said: Typically you can view past releases on the dockerhub page for that docker. Unfortunately there is no way of knowing what the version I had running before the upgrade was. Was it the previous version? Was the it the one before that? etc. I don't upgrade as soon as a new release is made so it could be anything in the last year. Is there a log of the docker upgrade operations and associated output anywhere? @Squid It just seems wrong that if I didn't happen to take a screenshot of the docker upgrade popup then it's gone forever. Edited November 27, 20214 yr by frakman1
November 27, 20214 yr 10 hours ago, frakman1 said: Is there a log of the docker upgrade operations and associated output anywhere? no I'm sure via applicable docker commands (inspect?) you could determine the digest of the container you were running and then compare that to the digest of the various tags to determine what :latest equated to, but it's a pain.
November 27, 20214 yr 5 hours ago, Squid said: you could determine the digest of the container you were running Thank you for the definitive answer and suggestion. I don't understand where the previous container's digest would be. Doesn't the old container get blown away after an upgrade? The only "inspect" I can run is on the new container. I also thought that an upgrade explicitly removed the orphan image that was the previous "latest" tagged image. I remember seeing that in the logs as the last step of the upgrade process. So after an upgrade, both the old container and the old image are gone and all I have is the new image and the new container created from it. Am I missing something? Maybe there's a misunderstanding. I'm not trying to figure out what version the current "latest" tag corresponds to. Yes, I can compare digests to published values. I am trying to determine the version of the previous version of the app just before the failed upgrade. It was also tagged as "latest".
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.