gytisgreitai / openhab-google-home

13 stars 1 forks source link

app.log for `app-only` image #5

Open mtzro2003 opened 5 years ago

mtzro2003 commented 5 years ago

Well, I've upgrade to latest image and I cannot see the log in the am-i-working endpoint.

...............................
       },
        "roomHint": "Livingroom",
        "willReportState": false,
        "customData": {
            "itemType": "Switch"
        },
        "attributes": {}
    }
]

Log file:

Log file coud not be found/read Error: ENOENT: no such file or directory, open '/var/log/app.log'

If I manually create the log file, it gets displayed, but it doesn't log any action from Google.

/opt/app # ls -la /var/log/                                                                                                                                                                                                                                                                                                
total 8                                                                                                                                                                                                                                                                                                                    
drwxr-xr-x    2 root     root          4096 May  9 20:49 .                                                                                                                                                                                                                                                                 
drwxr-xr-x    1 root     root          4096 May  9 20:49 ..                                                                                                                                                                                                                                                                
/opt/app # touch /var/log/app.log                                                                                                                                                                                                                                                                                          
/opt/app # ls -la /var/log/                                                                                                                                                                                                                                                                                                
total 12                                                                                                                                                                                                                                                                                                                   
drwxr-xr-x    1 root     root          4096 Nov  6 07:54 .                                                                                                                                                                                                                                                                 
drwxr-xr-x    1 root     root          4096 May  9 20:49 ..                                                                                                                                                                                                                                                                
-rw-r--r--    1 root     root             0 Nov  6 07:54 app.log                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
/opt/app # echo test >> /var/log/app.log                                                                                                                                                                                                                                                                                   
.............................
        "roomHint": "Livingroom",
        "willReportState": false,
        "customData": {
            "itemType": "Switch"
        },
        "attributes": {}
    }
]

Log file:

test
gytisgreitai commented 5 years ago

mhm I must make those images more consistent. app-only logs to stdout so you should see the logs with docker logs <pid>.

Why do you want to access the logs ? Did the newest image break something?

mtzro2003 commented 5 years ago

Nothing broke, but I want to investigate some more and I'd need to provide logs in case I file an issue :) I'm having a little bit of trouble with some similar named items and I need to digg deeper...

On Wed, Nov 6, 2019, 10:29 Gytis Ramanauskas notifications@github.com wrote:

mhm I must make those images more consistent. app-only logs to stdout so you should see the logs with docker logs .

Why do you want to access the logs ? Did the newest image break something?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gytisgreitai/openhab-google-home/issues/5?email_source=notifications&email_token=AAQWPIUY6TG4CNWA5IIVKADQSJ57ZA5CNFSM4JJRCQBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDFWQQQ#issuecomment-550201410, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQWPIUIZQQJ7D3FZHS2HWTQSJ57ZANCNFSM4JJRCQBA .

gytisgreitai commented 5 years ago

well if something is unclear just ask :)