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

Title: DmLogger
Post 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!
Title: Re: DmLogger
Post by: plcnut on December 31, 2015, 10:27:04 AM
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..."
Title: Re: DmLogger
Post by: BobO on December 31, 2015, 10:33:22 AM
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.
Title: Re: DmLogger
Post by: plcnut on December 31, 2015, 11:39:54 AM
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".
Title: Re: DmLogger
Post by: mhw on December 31, 2015, 02:04:38 PM
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?
Title: Re: DmLogger
Post by: BobO on December 31, 2015, 02:16:08 PM
Just copy the executable from the DmD bin directory.
Title: Re: DmLogger
Post by: HB_GUY on January 03, 2016, 02:57:48 AM
Anyone know of a way to have DMLogger run as a windows service?
Title: Re: DmLogger
Post by: BobO on January 03, 2016, 10:27:38 AM
No clue of what that takes. The source is available if you'd like to take a shot at it. ;)
Title: Re: DmLogger
Post by: HB_GUY on January 03, 2016, 01:34:08 PM
I'd love too. Where can I find it?
Title: Re: DmLogger
Post by: BobO on January 05, 2016, 10:13:35 AM
Send a request to support@hosteng.com and we'll get it out to you.
Title: Re: DmLogger
Post by: deep6ixed on January 05, 2016, 10:41:09 AM
Try NSSM

https://nssm.cc/

If it's just on your pc then this might be an easier option.
Title: Re: DmLogger
Post by: BobO on January 05, 2016, 11:01:16 AM
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.
Title: Re: DmLogger
Post by: Garyhlucas on January 07, 2016, 09:37:25 PM
Many a company has been founded on the 'we suck but less than the other guys' principal.