FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour filelog
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

filelog

Posted: Thu Aug 20, 2009 08:33 AM

Would it be possible to have a crypt possibility to the filelog function and if yes how would the decrypt be handled?
Thanks in advance
Otto

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: filelog

Posted: Thu Aug 20, 2009 10:12 AM
Otto,

You can use FWH functions Encrypt() and Decrypt():

http://wiki.fivetechsoft.com/doku.php?id=fivewin_function_encrypt
http://wiki.fivetechsoft.com/doku.php?id=fivewin_function_decrypt

i.e.:

MemoWrit( "file.log", Encrypt( MemoRead( "another.log" ) ) )

MsgInfo( Decrypt( MemoRead( "file.log" ) ) )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: filelog

Posted: Thu Aug 20, 2009 03:24 PM

Hello Antonio,
thank you. But I would like to decrypt the text before writing to the disk but after filelog made of all the single array entries a string.
Do you think this is possible?
Thanks in advance
Otto

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: filelog

Posted: Thu Aug 20, 2009 03:35 PM

Otto,

Is it for error.log or for another log file ?

What function or code do you use to create the log file ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: filelog

Posted: Thu Aug 20, 2009 05:25 PM

Hello Antonio,

logfile( Setup():Daten + "protokoll\log" + dtos(date()) + ".txt",;
{ "SaveStandard", ::oZiRg:code,::oZiRg:USER_TIME,::LEdit,::oZiRg:artnum, ::oZiRg:bezeichnun, ::oZiRg:Menge, ::oZiRg:preis } )

I would like to use it for program intern protocols.
The different elements could be of different values.
These protocols should only be readable for service techniques in case the is a problem.
Best regards,
Otto

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: filelog

Posted: Thu Aug 20, 2009 06:00 PM

Otto,

Have you tried with :

{ Encrypt( "SaveStandard" ), Encrypt( ::oZiRg:code ), Encrypt( ::oZiRg:USER_TIME ), Encrypt( ::LEdit ), Encrypt( ::oZiRg:artnum ), ...

each value must be of character type. If not then use Encrypt( cValToChar( ... ) )

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion