Make new log or improve log with command term

What is the problem?
Hi, i want to add some information in my log (octoprint.log or other) like the cost estimation when print in OK

Any Ideas ?

Thx a lot

What did you already try to solve it?
I try to add log when print is OK with command line -> NOK

Logs (octoprint.log, serial.log or output on terminal tab, ...)

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, ...)
Octoprint V1.3.11
Cost Estimator V2.1.2

echo 'This part will cost $1.00' >> ~/.octoprint/logs/octoprint.log

But honestly, you can create a folder under ~/.octoprint/data like ~/.octoprint/data/cost and then add to your own log there instead.

echo 'This part will cost $1.00' >> ~/.octoprint/data/cost/cost.log

Hi @OutsourcedGuru, thx for your reply, i already try to make pipe, but it doesn't work ...
I want to display new when finish -> : "Print finish by [user_when_launch_printjob] in [time] and cost [cost_price]"
Have U some idea for get cost and user value ?

Thx

If you're creating a plugin, then your code would have access to the user who's logged in and to the duration of the job. Presumably, you'd have some multiplier set to make the determination of time * multiplier = cost.

from flask_login import current_user
    if current_user is not None and not current_user.is_anonymous():
        # current_user.get_name() is the currently-logged in user by name

If you're not creating a plugin then the classic way of asking OctoPrint for information is through the REST API. You might be able to query the currently running job and get the duration. And yet, you'd need to know how to make a call like that and to interpret what you're seeing.

If you're not a coder and not good with these sorts of things then I might suggest looking for a plugin which might already do this.

Hi,
thx for your reply =)
I'm not very fluent with Octoprint log or plugin system ....
I'll continue my search on the web or ask log in Cost Estimation plugin :wink: