Difference between revisions of "Manual:DIL Manual/flog()"

From DikuMUD Wiki
Jump to navigation Jump to search
(XML import)
 
(XML import)
 
Line 1: Line 1:
 +
<span id="bpflog"></span>
  
 +
'''Function:'''  <i><!--CODE-->flog (filename : string,  s : string, wa : string );</i><!--ENDCODE-->
  
 +
<!--TERM-->  '''filename'''
 +
<!--DEFINITION-->        The Filename of the file to appear in the log directory.
 +
<!--TERM-->  '''s'''
 +
<!--DEFINITION-->        The string to be logged.
 +
<!--TERM-->  '''wa'''
 +
<!--DEFINITION-->        Write or Append
 +
 +
The 'flog' function allows you to split up your logs in the log directory
 +
so that you don't end up with everything in the main vme.log.
 +
'''Note:'''The append/write argument must be in lower case and can only be a
 +
'w' or a 'a' surrounded by '"'.  If the argument is a 'w' it will over write
 +
any log file by that name.  If the argument is 'a' it will append to the
 +
file by that name.
 +
'''Example:'''
 +
<i><!--CODE-->
 +
 +
---~---~---~---~---~---~---~---~---
 +
 +
dilbegin zonelog (s:string);
 +
code
 +
dilend
 +
 +
---~---~---~---~---~---~---~---~---
 +
 +
</i><!--ENDCODE-->
 +
The previous DIL function will work in any zone to log to a file with that
 +
zones name each zone could use it to keep zone logs separate.
 +
 +
 +
 +
---~---~---~---~---~---~---~---~---
 
<span id="bpflog"></span>
 
<span id="bpflog"></span>
  
Line 25: Line 58:
 
  dilbegin zonelog (s:string);
 
  dilbegin zonelog (s:string);
 
  code
 
  code
{
+
dilend
flog (self.zonidx+".log",s,"a");
 
return;
 
}
 
dilend
 
  
 
  ---~---~---~---~---~---~---~---~---
 
  ---~---~---~---~---~---~---~---~---

Latest revision as of 22:33, 4 December 2025

Function:  flog (filename : string,  s : string, wa : string );
  filename
         The Filename of the file to appear in the log directory.
  s
         The string to be logged.
  wa
         Write or Append
The 'flog' function allows you to split up your logs in the log directory
so that you don't end up with everything in the main vme.log.
Note:The append/write argument must be in lower case and can only be a
'w' or a 'a' surrounded by '"'.  If the argument is a 'w' it will over write
any log file by that name.  If the argument is 'a' it will append to the
file by that name.
Example:

---~---~---~---~---~---~---~---~---
dilbegin zonelog (s:string);
code

dilend

---~---~---~---~---~---~---~---~---

The previous DIL function will work in any zone to log to a file with that
zones name each zone could use it to keep zone logs separate.


---~---~---~---~---~---~---~---~---

Function:  flog (filename : string,  s : string, wa : string );
  filename
         The Filename of the file to appear in the log directory.
  s
         The string to be logged.
  wa
         Write or Append
The 'flog' function allows you to split up your logs in the log directory
so that you don't end up with everything in the main vme.log.
Note:The append/write argument must be in lower case and can only be a
'w' or a 'a' surrounded by '"'.  If the argument is a 'w' it will over write
any log file by that name.  If the argument is 'a' it will append to the
file by that name.
Example:

---~---~---~---~---~---~---~---~---
dilbegin zonelog (s:string);
code

dilend

---~---~---~---~---~---~---~---~---

The previous DIL function will work in any zone to log to a file with that
zones name each zone could use it to keep zone logs separate.


---~---~---~---~---~---~---~---~---