FRED™  3.0
FRED™: Framework for Rapid and Easy Development
Stats Class Reference
Inheritance diagram for Stats:
Handler Thing

Public Member Functions

 add ($prio, $message, $context)
 
- Public Member Functions inherited from Handler
 __construct ($log, $config, $name=null)
 
 add ($prio, $message, $context)
 
- Public Member Functions inherited from Thing
 propertyExists ($property)
 Check if a property exists (public or published). More...
 
 constants ($prefix=null)
 Return all constants. More...
 
 get ($key)
 Get one or more properties. More...
 
 set ($key, $value=null)
 Set one or more properties. More...
 
 __get ($key)
 
 __set ($key, $value)
 

Data Fields

 $filename = null
 File to store messages. More...
 
 $ttl = 3600
 Time to keep messages in memory. More...
 
 $charThreshold = 100
 Minimum number of charactes to match, or: More...
 
 $percThreshold = 75
 Minimum percentage to match. More...
 
 $threshold = 10
 Send mail after this number of messages within the TTL. More...
 
 $from = null
 Sender (defaults to default From address). More...
 
 $to = null
 Send mail to this address (or array for multiple; defaults to default From address). More...
 
 $subject = 'Log stats *'
 Subject for the mail (an asterisk is replaced with the host name). More...
 
 $message = 'Message "[message]" ([filename]@[lineNo]) occurred [threshold] times in the last [ttl] seconds'
 Mail. More...
 
- Data Fields inherited from Thing
const HIDDEN = 0
 Property is hidden. More...
 
const READABLE = 1
 Property is readable. More...
 
const WRITEABLE = 2
 Property is writeable. More...
 
const READWRITE = 3
 Property is readable and writeable. More...
 

Protected Member Functions

 same ($new_message, $old_message)
 
 send ($filename, $line_no, $message)
 
- Protected Member Functions inherited from Handler
 init ()
 
- Protected Member Functions inherited from Thing
 publish ($property, $visibility=self::READABLE)
 Publish a property (or hide it again). More...
 
 configure ($config)
 Configure the object. More...
 
 _get ($key)
 Default getter if no specific setter is defined, and the property is also not published (readable). More...
 
 _set ($key, $value)
 Default setter if no specific setter is defined, and the property is also not published (writeable). More...
 

Additional Inherited Members

- Protected Attributes inherited from Handler
 $_log
 
 $_config = null
 
 $_name = null
 
- Protected Attributes inherited from Thing
 $_published = []
 Published properties (key = name of property, value = visibility). More...
 

Detailed Description

Definition at line 5 of file Stats.php.

Member Function Documentation

◆ add()

add (   $prio,
  $message,
  $context 
)

Definition at line 37 of file Stats.php.

◆ same()

same (   $new_message,
  $old_message 
)
protected

Definition at line 18 of file Stats.php.

◆ send()

send (   $filename,
  $line_no,
  $message 
)
protected

Definition at line 22 of file Stats.php.

Field Documentation

◆ $charThreshold

$charThreshold = 100

Minimum number of charactes to match, or:

Definition at line 9 of file Stats.php.

◆ $filename

$filename = null

File to store messages.

Definition at line 7 of file Stats.php.

◆ $from

$from = null

Sender (defaults to default From address).

Definition at line 12 of file Stats.php.

◆ $message

$message = 'Message "[message]" ([filename]@[lineNo]) occurred [threshold] times in the last [ttl] seconds'

Mail.

Definition at line 15 of file Stats.php.

◆ $percThreshold

$percThreshold = 75

Minimum percentage to match.

Definition at line 10 of file Stats.php.

◆ $subject

$subject = 'Log stats *'

Subject for the mail (an asterisk is replaced with the host name).

Definition at line 14 of file Stats.php.

◆ $threshold

$threshold = 10

Send mail after this number of messages within the TTL.

Definition at line 11 of file Stats.php.

◆ $to

$to = null

Send mail to this address (or array for multiple; defaults to default From address).

Definition at line 13 of file Stats.php.

◆ $ttl

$ttl = 3600

Time to keep messages in memory.

Definition at line 8 of file Stats.php.


The documentation for this class was generated from the following file: