Not really sure how best to title this, sorry.
Using the Python API guide as a follow-along for 'managing your gis servers'
The query itself is working but seems to be ignoring the time filter:
comparing to the GUI in Sever Manager I'm not lining up these times with anything. I can supply any argument I want for start_time and no error is returned:
If I leave out the 'start_time' parameter entirely, the query returns exactly what I'm seeing in the Server Manager GUI exactly.
I'm I using start_time wrong? (Or is my understanding of it incorrect?)
So I decided to test this for Portal logs too and it works just as expected there.
If I only filter for a start_time of 1 day ago i'm getting back hundreds of entries going back a month or so.
now = datetime.datetime.now() StartTime = now - datetime.timedelta(hours=1) StartTime ServerLogs = server1.logs.query(level = 'SEVERE',start_time = StartTime) ServerLogs
If i use the GUI in Server Manager with the same filter, I see 4 entries.
Any querying from the API and the Portal log GUI however match exactly.