Comments (7)
If you add --timestamp
onto the docker-compose logs
you will get the timestamp info for TeslaMateAgile, but this will cause double timestamps for things like TeslaMate.
If you want the app to directly output timestamps in the same style as TeslaMate itself you can add the following environment variables:
- Logging__Console__FormatterName=simple
- "Logging__Console__FormatterOptions__TimestampFormat=yyyy-MM-dd hh:mm:ss.fff "
Note that quote marks around the second one are needed as there should be a space at the end of the timestamp format.
That will look like this:
matt@abyss:~$ sudo docker logs teslamateagile --since 1m -f
2021-07-04 03:01:00.871 info: TeslaMateAgile.PriceService[0]
Price service is starting
2021-07-04 03:01:00.875 info: TeslaMateAgile.PriceService[0]
Using energy provider FixedPrice
2021-07-04 03:01:00.876 info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
2021-07-04 03:01:00.878 info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
2021-07-04 03:01:00.878 info: Microsoft.Hosting.Lifetime[0]
Content root path: /app/
2021-07-04 03:01:02.279 info: TeslaMateAgile.PriceHelper[0]
No new charging processes
2021-07-04 03:01:02.282 info: TeslaMateAgile.PriceService[0]
Waiting 300 seconds until next update
Check out this page for options on what formats you can use: https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings
I have now also removed the Updating prices
log message to reduce confusion, this will go out in the next release v1.7.0
.
I've also added to the README about how to enable timestamps as above too so others can do the same if they wish.
Hopefully this is what you were looking for ๐
from teslamateagile.
Good spot! I will update the readme accordingly, glad it's all working for you ๐
from teslamateagile.
Hey there, for timestamps I recommend using the docker built in options to show timestamps: https://docs.docker.com/compose/reference/logs/
As for the updating prices, it's a bit of a misleading log really that's just what it says every time it checks to see if there is any new charges to calculate cost for
Hope this helps!
from teslamateagile.
Hopefully that's solved your issues. I will change the log message about updating prices to reduce confusion as I agree it is misleading.
from teslamateagile.
Sorry for the late reply... This is what I mean about the logging, if I issue "docker-compose logs" I get the teslamate logs nicely time-stamped, but the teslamateagile logs are very sparse:
<snip>
teslamate_1 | 2021-06-27 16:52:52.541 [info] GET /public/build/moment~app.fd61e9de3c3d9b43f138.js
teslamate_1 | 2021-06-27 16:52:52.541 [info] Sent 404 in 244ยตs
teslamate_1 | 2021-06-27 16:52:52.542 [info] GET /public/build/unicons~app.fd61e9de3c3d9b43f138.js
teslamate_1 | 2021-06-27 16:52:52.543 [info] Sent 404 in 159ยตs
teslamateagile_1 | info: TeslaMateAgile.PriceHelper[0]
teslamateagile_1 | Updating prices
teslamateagile_1 | info: TeslaMateAgile.PriceHelper[0]
teslamateagile_1 | No new charging processes
<snip>
from teslamateagile.
Thanks, perfect!!
from teslamateagile.
Note that the formatting should be like this for 24h format (HH rather than hh):
- "Logging__Console__FormatterOptions__TimestampFormat=yyyy-MM-dd HH:mm:ss.fff "
from teslamateagile.
Related Issues (20)
- Can't calculate certain fixed prices HOT 22
- Weekend and Summer/Winter pricing HOT 23
- Costs not calculated after upgrade to 1.8.0 HOT 6
- Specifying an invalid GeofenceID does not throw errors HOT 4
- Configured geofence 'Home' (id: 1) has a cost per unit set which will prevent TeslaMateAgile from working properly HOT 5
- Entsoe transparency API provider support HOT 4
- Very short top-up charges don't get costed. HOT 5
- Some Crashing Entries HOT 5
- Provider feature request : EDF Tempo French Provider HOT 3
- Error calculating costs with Tibber provider HOT 3
- Feature Request: Octopus Intelligent HOT 7
- UTC time issue HOT 4
- Multiple providers? HOT 2
- Feature request? Generic input of dynamic pricing HOT 2
- Calculation fails when the end time of a charge is very close to the beginning of the hour HOT 3
- Unable to calculate cost of some charges HOT 11
- Create REST endpoint to get price at specific datetime HOT 3
- Failed to update prices - System.ArgumentException: totalHours HOT 6
- Failed to calculate charging cost / energy for charging process HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from teslamateagile.