Initial: flux text FoxBin2Prg (git urmareste .??2 in-arbore, binarele VFP git-ignored)
Inrolare ROACONTRACTE conform COMUN\docs\inrolare-proiect-git-text.md: - .gitignore/.gitattributes dupa modelul ROACONT (COMUN/ exclus, are repo propriu) - 439 texte FoxBin2Prg generate in arbore (vc2/sc2/fr2/mn2/pj2/db2) - Clase\registry.vcx ramane binar: memo .vct corupt (Error 41), nu se poate converti - Clase\ferestre_contracte.vcx: text generat, roundtrip scutit (fara write-back) - CLAUDE.md, docs/README.md, roa_sync.bat Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RYbiinqXxdEqXi53x4Ro7K
This commit is contained in:
96
Programe/Log_mesaje.prg
Normal file
96
Programe/Log_mesaje.prg
Normal file
@@ -0,0 +1,96 @@
|
||||
*!* in programul principal :
|
||||
*!* public poLog && obiect pt logarea mesajelor sistemului
|
||||
*!* poLog = NEWOBJECT("Log_Mesaje","Log_Mesaje.prg")
|
||||
|
||||
*!* pe parcursul programului:
|
||||
*!* lcLog = [1]
|
||||
*!* poLog.Log(lcLog,PROGRAM())
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE CLASS log_mesaje as Relation
|
||||
|
||||
cLogFile = "c:\log.txt"
|
||||
lLogging = .F.
|
||||
|
||||
&& ------------------------------INCEPUT: Init ------------------------------
|
||||
*!* Procedura: Init
|
||||
*!* Parametri:
|
||||
*!* Data/Ora generarii: 20/02/2004 12:41:53
|
||||
*!* Autor: MARIUS.MUTU
|
||||
PROCEDURE Init
|
||||
LPARAMETERS tcLogFile, tlAdditive
|
||||
|
||||
|
||||
|
||||
|
||||
lLog = IIF(FILE(ADDBS(JUSTPATH(SYS(16,0)))+"LOG.txt"),.T.,.F.) && daca exista fisierul log
|
||||
this.lLogging = lLog or this.lLogging && creez log daca exista in directorul aplicatiei fisierul <log.txt> sau daca proprietatea lLogging = .T.
|
||||
|
||||
IF !this.lLogging
|
||||
RETURN
|
||||
ENDIF
|
||||
|
||||
SET console off
|
||||
SET TALK OFF
|
||||
|
||||
cLogFile = IIF(EMPTY(tcLogFile),ADDBS(JUSTPATH(SYS(16,0)))+"LOG_"+JUSTSTEM(SYS(16,0))+".txt","")
|
||||
this.cLogFile = cLogFile
|
||||
|
||||
IF PARAMETERS() < 2
|
||||
llAdditive = IIF(FILE(cLogFile),.T.,.F.)
|
||||
ELSE
|
||||
llAdditive = tlAdditive
|
||||
ENDIF
|
||||
|
||||
IF llAdditive
|
||||
SET TEXTMERGE ON TO (cLogFile) ADDITIVE
|
||||
ELSE
|
||||
SET TEXTMERGE ON TO (cLogFile)
|
||||
ENDIF
|
||||
|
||||
\
|
||||
\\<<TIME()>>
|
||||
|
||||
SET TEXTMERGE TO
|
||||
|
||||
|
||||
|
||||
ENDPROC
|
||||
&& ------------------------------SFARSIT: Init ------------------------------
|
||||
|
||||
&& ------------------------------INCEPUT: Log ------------------------------
|
||||
*!* Procedura: Log
|
||||
*!* Parametri: tcText
|
||||
*!* Data/Ora generarii: 20/02/2004 12:48:57
|
||||
*!* Autor: MARIUS.MUTU
|
||||
PROCEDURE Log
|
||||
LPARAMETERS tcText, tcProgram
|
||||
|
||||
IF !this.lLogging
|
||||
RETURN
|
||||
ENDIF
|
||||
|
||||
LOCAL lcText, lcLogFile
|
||||
|
||||
SET console off
|
||||
SET TALK OFF
|
||||
|
||||
lcText = IIF(EMPTY(tcText),"",ALLTRIM(tcText))
|
||||
lcProgram = IIF(EMPTY(tcProgram),"",ALLTRIM(tcProgram))
|
||||
lcSpatiu = SPACE(10)
|
||||
|
||||
lcLogFile = this.cLogFile
|
||||
lcAddText = TIME() + IIF(!EMPTY(lcProgram),lcSpatiu+lcProgram,"") + IIF(!EMPTY(lcText),lcSpatiu+lcText,"")
|
||||
|
||||
SET TEXTMERGE ON TO (lcLogFile) ADDITIVE
|
||||
|
||||
\ <<lcAddText>>
|
||||
|
||||
SET TEXTMERGE TO
|
||||
|
||||
ENDPROC
|
||||
&& ------------------------------SFARSIT: Log ------------------------------
|
||||
|
||||
ENDDEFINE && log_mesaje
|
||||
Reference in New Issue
Block a user