Advertisement
Scriv07

MyUserName:MyModName:UserLog

Jul 6th, 2016
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.70 KB | None | 0 0
  1. Scriptname MyUserName:MyModName:UserLog Hidden
  2.  
  3. string Function GetName() Global
  4.     return "MyModName"
  5. EndFunction
  6.  
  7.  
  8. string Function GetAuthor() Global
  9.     return "MyUserName"
  10. EndFunction
  11.  
  12.  
  13. Function WriteLine(string asMessage, var aObject = none) Global
  14.     string sLogName = GetAuthor() + "_" + GetName()
  15.     string sLog = aObject + " :: " + asMessage
  16.     If(Debug.TraceUser(sLogName, sLog))
  17.         return
  18.     Else
  19.         Debug.OpenUserLog(sLogName)
  20.         Debug.TraceUser(sLogName, sLog)
  21.     EndIf
  22. EndFunction
  23.  
  24.  
  25. Function WriteChangedValue(string asPropertyName, var aFromValue, var aToValue, var aObject = none) Global
  26.     WriteLine("Setting "+asPropertyName+" from " + aFromValue + " to " + aToValue, aObject)
  27. EndFunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement