Link to home
Start Free TrialLog in
Avatar of navgup
navgup

asked on

Log database code

I m writing code to archive docs from one of my notes app. I need to log every docs that is being archived just as notes does logging in log.nsf. I can either use txt or rtf to store upto a certain limit of data (< 64k) and then create a new log document.

Can any one provide me with a sample code/db that i could start with?
Avatar of SysExpert
SysExpert
Flag of Israel image

There is bult in Log function in Lotus script.


A more detailed version I use is as follows.
I have a script library that as the following.


The Form has the fields defined as in the last entry.


Dim logDocx As NotesDocument
      ' changed global to Logdocx from logdoc 11/23/05

Dim curDbL As NotesDatabase
Dim sL As NotesSession
Sub Initialize
      Set SL= New NotesSession
      Set CurDbL = SL.CurrentDatabase
      
End Sub

Sub CreateLogEntry1(Msg As String, ERL1 As  String , ERNum As  String)
      ' changed global to Logdocx from logdoc 11/23/05
      Set logDocx = curDBL.CreateDocument()
      
      logDocx.Form = "Logfrm1" ' Form to use
      logDocx.DateLog = Now
      
      logDocx.StERL = ERL1
      logDocx.StERNum = ERNum
      logDocx.StStatus = "0"
      
      logDocx.StBy = SL.UserName
      logDocx.StDetails = Msg
      
      Call logDocx.Save(0,0)
            
End Sub
In the Domino Help Search for

Making a Log

It has samples of your options.

I hope this helps !
ASKER CERTIFIED SOLUTION
Avatar of SysExpert
SysExpert
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial