Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: mhw on December 31, 2015, 07:27:33 AM
-
I am wanting to use DmLogger to send daily data to a file. Is it possible to use a variable in the filename? If yes then what is the syntax?
Thanks, and I hope all have a happy and blessed new year!
-
It is all in DMD help topic DMD0283.
Sample STRPRINT:
"#file:C:\MyLog\MyLogFileName_" V1 ".txt#" "Here is all the data that will be placed into the file..."
-
You can.
The message format is: #FILE:f#m
Where f = Filename and m = message text
From a STRPRINT instruction the script might look like this: "#FILE:DailyLog" $Now.Month "_" $Now.Day "_" $Now.Year ".txt#" "This is my message text"
It should produce "#FILE:DailyLog12_31_2015.txt#This is my message text". Just STREAMOUT that to the DMLogger device (with DMLogger running) and it will open that file and add that entry.
-
Also, if you are having problems getting it to work, Windows sometimes gets fussy with letting the logger write to the root directory. Adding a new folder to the root of your drive should remedy this. Another thing that may be necessary is to make sure that DmLoggrr is running "as administrator".
-
Works fine, thanks for the responses.
Is DmLogger available as a separate download for putting on the customer computer or must the whole DMD package be installed?
-
Just copy the executable from the DmD bin directory.
-
Anyone know of a way to have DMLogger run as a windows service?
-
No clue of what that takes. The source is available if you'd like to take a shot at it. ;)
-
I'd love too. Where can I find it?
-
Send a request to support@hosteng.com and we'll get it out to you.
-
Try NSSM
https://nssm.cc/
If it's just on your pc then this might be an easier option.
-
That's pretty funny. We have something here at Host that we refer to as the "BDS threshold"...BDS stands for "barely doesn't suck". For us it is the reminder that in a world where so many products do suck, showing up with one that barely doesn't may be a good starting point.
-
Many a company has been founded on the 'we suck but less than the other guys' principal.